spyder: Error is displayed in the editor even after it has been fixed (Linux)
Hey everyone, thanks for all the hard work on Spyder 4. When I introduce an error in my code (eg by assigning a variable to a non-existing variable) and fix it immediately, the original error message will not go away unless I restart the python language server.
This only occurs when I introduce the error in the middle of my scripts, but not at the beginning.
This GIF shows what I am talking about:

Issue Report Checklist
- Searched the issues page for similar reports
- Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- Reproduced the issue after updating with
conda update spyder(orpip, if not using Anaconda) - Could not reproduce inside
jupyter qtconsole(if console-related) - Tried basic troubleshooting (if a bug/error)
- Restarted Spyder
- Reset preferences with
spyder --reset - Reinstalled the latest version of Anaconda
- Tried the other applicable steps from the Troubleshooting Guide
- Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
Pyflakes error message does not disappear after error in code is fixed.
Steps to reproduce
- Open medium-to-large script in spyder
- Go to somewhere in the middle
- Add faulty line that references a non-existing variable
- Fix faulty line
Notes on reproducibility:
- occurred with several medium (~100 lines or more) to large scripts
- failed to reproduce with simple mock code
- failed to reproduce when introducing error in beginning of script (see GIF)
Versions
- Spyder version: 4.1.2
- Python version: 3.8.2
- Qt version: 5.9.7
- PyQt version: 5.9.2
- Operating System name/version: Ubuntu 19.10
Dependencies
# Mandatory:
atomicwrites >=1.2.0 : 1.3.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
cloudpickle >=0.5.0 : 1.3.0 (OK)
diff_match_patch >=20181111 : 20181111 (OK)
intervaltree : None (OK)
IPython >=4.0 : 7.13.0 (OK)
jedi =0.15.2 : 0.15.2 (OK)
keyring : None (OK)
nbconvert >=4.0 : 5.6.1 (OK)
numpydoc >=0.6.0 : 0.9.2 (OK)
parso =0.5.2 : 0.5.2 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.7.0 (OK)
pygments >=2.0 : 2.6.1 (OK)
pylint >=0.25 : 2.4.4 (OK)
pyls >=0.31.9;<0.32.0 : 0.31.9 (OK)
qdarkstyle >=2.8 : 2.8.1 (OK)
qtawesome >=0.5.7 : 0.7.0 (OK)
qtconsole >=4.6.0 : 4.7.2 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
rtree >=0.8.3 : 0.9.4 (OK)
sphinx >=0.6.6 : 3.0.0 (OK)
spyder_kernels >=1.9.0;<1.10.0 : 1.9.0 (OK)
watchdog : None (OK)
xdg >=0.26 : 0.26 (OK)
zmq >=17 : 19.0.0 (OK)
# Optional:
cython >=0.21 : None (OK)
matplotlib >=2.0.0 : 3.1.3 (OK)
numpy >=1.7 : 1.18.1 (OK)
pandas >=0.13.1 : 1.0.3 (OK)
scipy >=0.17.0 : 1.4.1 (OK)
sympy >=0.7.3 : None (OK)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (8 by maintainers)
Just wanted to say that the error does not occur anymore with 4.1.4. Thanks again for taking care of this!
@ccordoba12 Thank you very much for taking care of this, I’ll make sure to check out 4.1.4!