question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Code completion and linting stop working during the current session

See original GitHub issue

After working for a while in Spyder at some point several functions just stop working:

  • Code folding
  • Code checking
  • Linting and Completion
  • Jump to definition (ctrl+g)

Often there is no error message, sometimes there is one that tells me that code completion and linting will not work in the current session or have stopped working. It tells me to make sure that my firewall or antivirus allow Python processes to open ports on my system or to restart Spyder.

I’m working at a company behind a company firewall with an Antivirus Software.

My question is now:

  1. Why is it able to work for like 10 minutes before suddenly stopping? Apparently the local Python Language Server is working normally, so why does it suddenly stop?
  2. Can this be solved using the Proxy-Settings in the preferences?

EDIT 1: I played around with the advanced settings. In the end I enabled the usage of STDIO-Pipes and started Spyder with that option enabled. Performance was worse and the error also happened after a while, so I switched the option off and continued working. Apparently this restarted the language server and since then (about an hour ago) it has been running without fail. This makes it look more like the issue is not with my system’s firewall or antivirus but some internal Spyder issue, maybe something that happens at startup?

EDIT 2: After about 4 hours the error happend again. I did what I did above, go into the settings, activate STDIO-Pipes, then deactivate it again, now the server is running again normally.

Versions

  • Spyder version: 4.0.0
  • Python version: 3.7.3
  • Qt version: 5.12.5
  • PyQt version: 5.12.3
  • Operating System name/version: Windows 10

Dependencies

cloudpickle >=0.5.0          :  1.2.2 (OK)
pygments >=2.0               :  2.5.2 (OK)
qtconsole >=4.6.0            :  4.6.0 (OK)
nbconvert >=4.0              :  5.6.1 (OK)
sphinx >=0.6.6               :  2.2.2 (OK)
pylint >=0.25                :  2.4.4 (OK)
psutil >=0.3                 :  5.6.7 (OK)
qtawesome >=0.5.7            :  0.6.0 (OK)
qtpy >=1.5.0                 :  1.9.0 (OK)
pickleshare >=0.4            :  0.7.5 (OK)
zmq >=17                     :  18.1.1 (OK)
chardet >=2.0.0              :  3.0.4 (OK)
numpydoc >=0.6.0             :  0.9.1 (OK)
spyder_kernels >=1.8.1;<2.0.0:  1.8.1 (OK)
qdarkstyle >=2.7             :  2.7 (OK)
atomicwrites >=1.2.0         :  1.3.0 (OK)
diff_match_patch >=20181111  :  20181111 (OK)
intervaltree                 :  None (OK)
watchdog                     :  None (OK)
keyring                      :  None (OK)
pexpect >=4.4.0              :  4.7.0 (OK)
pympler                      :  None (OK)
sympy >=0.7.3                :  1.4 (OK)
cython >=0.21                :  0.29.14 (OK)
IPython >=4.0                :  7.10.1 (OK)
matplotlib >=2.0.0           :  3.1.2 (OK)
pandas >=0.13.1              :  0.25.3 (OK)
numpy >=1.7                  :  1.17.3 (OK)
scipy >=0.17.0               :  1.3.1 (OK)
pyls >=0.31.2;<0.32.0        :  0.31.2 (OK)
rtree >=0.8.3                :  0.9.1 (OK)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:81 (28 by maintainers)

github_iconTop GitHub Comments

10reactions
goanpecacommented, Mar 25, 2020

We are working on this to improve the current UI and also add the possibility of restarting the language server manually. The new release should be available next week.

9reactions
rgommerscommented, Apr 4, 2020

Same here. It was really nice to work with Spyder 2 and 3. …

Starting with version 4 (or perhaps already somewhere at version 3), with each new version Spyder started to introduce more bugs than features. Imho the focus should for now should be on fixing all the bugs introduced by new (highly optional) features like Kite etc…

Please note that there were a lot of users wanting improved code completion and other new features. The Spyder 4 release was a massive overhaul of the code base. When you do such a large release with a relatively small team, naturally bugs will creep in. The Spyder team has worked very hard over the past couple of months on bug fixing to stabilize the 4.x series. 4.1.2 was tagged yesterday, and is now a PR on conda-forge that passes all CI - so should be available shortly.

Over the last year in my workplace Spyder “acquired” a set of nicknames, of which “Cryder” (Crashy-Spyder) is one of the most favorable. Spyder went from being the most used Python IDE to a share of about 10%. PyCharm (and some others) have taken over. Unluckily I also had to move to PyCharm yesterday, since no changes seem to happen on this critical issues and otherwise my timeschedule would break my neck…

So imho to discourage people from changing to other IDEs, fixing bugs should be top priority over new features or improving features. And this also includes bug-handling procedures. F.i. the PR on this absolutely critical bug is marked as merged since almost 5 days, but no release has been made. But isn’t fixing a critical bug the best reason ever to push an intermediate release, disregarding all planned PRs for the next release cycle?

@JoElfner honestly, I don’t think you understand what it takes to do a release of a package like Spyder. Speaking from experience as NumPy and SciPy release manager: it easily takes 1-2 days, and Spyder has a much more complex set of dependencies than NumPy/SciPy. @ccordoba12 and his team are working on this as hard as they can.

Please understand that comments like yours can be very demotivating, and are not really helpful. Community open source projects rely on a small number of maintainers, most of which are working very hard next to a day job or degree. If you want to help, please keep bug reports and comments constructive at a minimum. Contributing fixes or documentation, or donating (https://opencollective.com/spyder - $6500 yearly budget currently) would also be great to consider.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Completion and linting in the editor for Python files will not ...
Every time I open Spyder the warnings shows up and restarting the aplication doesn't solve the problem. If you can help me I...
Read more >
Completion And Linting In The Editor For Python ... - ADocLib
I'm working at a company behind a. ... Completion And Linting In The Editor For Python Files Will Not Work During Current Session,...
Read more >
Is Fleet as good as IDEA on auto completion, linting, refactor
Fleet's UI is written for the JVM and IIRC Jetbrains has said that it will not be working on a web version.
Read more >
User and Workspace Settings - Visual Studio Code
Here is the list of settings not supported in workspace settings: ... resume available working changes stored in the cloud for the current...
Read more >
Command-line usage — Nox 2022.11.21 documentation
By default Nox will run all sessions defined in the Noxfile. ... run all selected sessions on the current python interpreter (the one...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found