Repository: spyder-ide/spyder

Issue:
Windows standalone version crashes on launch with an AttributeError
First of all, I can't try everything I would like to troubleshoot the issue because I don't have permissions to manage the virtual machine I'm using. I had to request the installation of spyder, which the responsible party did, but without adding shortcuts in the start menu or on the desktop. I found two ways of launching spyder: right click a file and open with spyder, or through cmd ```C:\Program Files\Spyder>Python\python Spyder.launch.pyw``` either way the logs show the exact same output.

## Problem Description

With a fresh install of the standalone version on windows, spyder crashes on launch after a brief splash screen. 
I tried restarting it and clearing AppData/Local/Spyder, which is about all I can try with the permissions I have.
I found someone with the same unanswered issue on [stackoverflow](https://stackoverflow.com/questions/73057717/spyder-dont-launch). I can't try the suggested solution, which didn't work for them anyway, because I don't have pip on this machine.

### Steps to reproduce

1. Install the latest windows standalone version of spyder
2. Right click any file
3. "Edit with Spyder"

### Expected and actual output
Expected a GUI window after the splash screen. Getting nothing instead, the splash screen just closes.

### Full logs

```logs/cmd output
fromIccProfile: failed minimal tag size sanity
Traceback (most recent call last):
  File "C:\Program Files\Spyder\pkgs\spyder\app\mainwindow.py", line 753, in <lambda>
    lambda plugin_name, omit_conf: self.register_plugin(
  File "C:\Program Files\Spyder\pkgs\spyder\app\mainwindow.py", line 213, in register_plugin
    self.show_compatibility_message(message)
  File "C:\Program Files\Spyder\pkgs\spyder\app\mainwindow.py", line 1069, in __getattr__
    return super().__getattr__(attr)
AttributeError: 'MainWindow' object has no attribute 'show_compatibility_message'
```

## Versions
Spyder won't launch and I'm not using the conda version, so here's what I know from the included package files.

* Spyder version: latest standalone windows version
* Python version: 3.8.10
* Qt version: ?
* PyQt version: 5.15.7
* Operating System name/version: Windows Server 2016 Datacenter 64 bits (10.0, version 14393)



Discussion:
Hi @FontaineRiant thank you for the feedback! Could it be possible for you to run from cmd the following and submit here the generated log?:

    "C:\Program Files\Spyder\Python\python.exe" "C:\Program Files\Spyder\Spyder.launch.pyw" --debug-info verbose

I tried locally doing an installation for all the users (as it seems you have in the virtual machine that was provided to you) but Spyder starts normally. Could you also submit here the `mainwindow.py` file that is installed in you VM? Could this file been modified somehow when removing the shortcuts for the Spyder installation in your provided VM?

Any other info in order to reproduce this is greatly appreciated. Let us know!
I think this could be caused by not uninstalling the previous version and installing the current one on top of it. We've seen odd issues like this one triggered by that before.
Thank you for your replies.

> Hi @FontaineRiant thank you for the feedback! Could it be possible for you to run from cmd the following and submit here the generated log?:
> 
> ```
> "C:\Program Files\Spyder\Python\python.exe" "C:\Program Files\Spyder\Spyder.launch.pyw" --debug-info verbose
> ```
> 
> I tried locally doing an installation for all the users (as it seems you have in the virtual machine that was provided to you) but Spyder starts normally. Could you also submit here the `mainwindow.py` file that is installed in you VM? Could this file been modified somehow when removing the shortcuts for the Spyder installation in your provided VM?

[verbose_logs.txt](https://github.com/spyder-ide/spyder/files/9244462/verbose_logs.txt)
[mainwindow.py.txt](https://github.com/spyder-ide/spyder/files/9244466/mainwindow.py.txt)

I find very unlikely that mainwindow.py would have been modified as they usually just go through the installer without testing anything. The missing shortcuts were most likely unchecked instead of removed.

\_\_init\_\_.py shows that spyder's version is 5.3.2

> I think this could be caused by not uninstalling the previous version and installing the current one on top of it. We've seen odd issues like this one triggered by that before.

There was no previous version at all, it's a fresh install. I'm not ruling out a mistake of the person who did the installation, but I'd like to narrow down the issue before requesting another maintenance to try a reinstall. Because that won't happen before a couple of weeks and my team is getting impatient to start using a real IDE.

Resolving patch:
diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py
--- a/spyder/app/mainwindow.py
+++ b/spyder/app/mainwindow.py
@@ -210,7 +210,7 @@ def register_plugin(self, plugin_name, external=False, omit_conf=False):
         plugin.get_description()
 
         if not is_compatible:
-            self.show_compatibility_message(message)
+            self.show_plugin_compatibility_message(message)
             return
 
         # Connect Plugin Signals to main window methods


Test patch: