Windows standalone version crashes on launch with an AttributeError
See original GitHub issueFirst 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. 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
- Install the latest windows standalone version of spyder
- Right click any file
- “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
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)
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Indeed, importing winpty fails with the included environment:
Looking at the intended error message in
check_compatibility
, it mentions upgrading from windows 7. Meaning this is possibly also an issue with Windows Server 2016.Thanks @FontaineRiant for the logs! Checking them seems like there is an issue when loading the Terminal plugin:
Also checking the traceback more carefully indeed there is no
show_compatibility_message
method. The actual name for it isshow_plugin_compatibility_message
…Will submit a fix for this 👍
As a side note, I’m not totally sure why the Terminal plugin validation is failing (which then ends up trying to show the compatibility message). Checking the plugin’ code seems like it tries to
import winpty
and that is failing in your VM setup?:https://github.com/spyder-ide/spyder-terminal/blob/08568bfb2311710a2e6d1c46d5e1fab67648c8b5/spyder_terminal/terminalplugin.py#L109-L125
Also, @FontaineRiant what happens if you try to import
winpty
from the standalone Spyder Python interpreter? (so running from cmdC:\Program Files\Spyder\Python\python.exe
and then trying to runimport winpty
).Let us know!