Closed markdayel closed 4 years ago
When Starting Spyder 3.3.6 on Python 3.7.3 via SSH from cygwin
Sorry, we don't support cygwin nor use it, so we can't offer any help about this. Besides, no one else has reported an error like this before.
Found the issue---it's in the spyder.widgets.github.backend widget. Commenting it out from reporterror.py fixes the startup delay. The 'import keyring' line seems to be the culprit, which blocks if called from inside an SSH session (and takes 2 minutes to timeout). Issue has nothing to do with cygwin---starting spyder via 'ssh -X localhost' on the linux machine is enough to replicate.
Ok, thanks for finding the issue. How do you think we could fix this?
Looks like maybe the 'import keyring' is stalling waiting for a response from dbus, which is failing when connecting over SSH. I don't immediately see a way of detecting the failure without waiting 2 minutes, so maybe a quick workaround would be to detect that spyder is being launched from an ssh session ("SSH_CONNECTION" in os.environ) and if so, print a warning to the user and disable the import of spyder.widgets.github.backend widget in reporterror.py
a quick workaround would be to detect that spyder is being launched from an ssh session ("SSH_CONNECTION" in os.environ)
That's nice, I didn't know about that env var, thanks! I think we're going to deactivate using keyring
in that situation.
We're using keyring
to allow users saving their GH credentials safely to not enter them every time they want to report a bug. But you just proved us that it can't be used all the time.
I have the same problem except I'm just mounting a remote server and editing the source files there. My delay occurs between these lines in the debug output:
2021-03-04 11:40:12,049 [DEBUG] [chardet.universaldetector] -> no data received!
2021-03-04 11:40:12,049 [DEBUG] [chardet.universaldetector] -> no probers hit minimum threshold
2021-03-04 11:43:30,462 [DEBUG] [watchdog.observers.inotify_buffer] -> in-event <InotifyEvent: src_path=b'/data/amd-data/cera-rpd/cera-rpd-train/.git/index.lock', wd=10, mask=IN_MODIFY, cookie=0, name=index.lock>
Do these provide any clue as to why the 3 minute delay?
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
When Starting Spyder 3.3.6 on Python 3.7.3 via SSH from cygwin, startup pauses for 120 seconds, then completes successfully. This pause doesn't happen when starting spyder via ssh under Python 2.7, nor under Python 3.7.3 with local x-server.
What steps reproduce the problem?
What is the expected output? What do you see instead?
Expect startup to complete within a few seconds (as happens using Python 2.7 to start spyder), but instead it pauses for 2 minutes during startup.
Paste Traceback/Error Below (if applicable)
With SPYDER_DEBUG set to 3:
Pauses for 2 minutes here, then continues...
Versions
Dependencies