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:

conda update spyder (or pip, if not using Anaconda)jupyter qtconsole (if console-related)spyder --resetPyflakes error message does not disappear after error in code is fixed.
Notes on reproducibility:
# 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)
Open medium-to-large script in spyder
This is not enough. Please share with us the script you are showing in your gif to see if we can reproduce this bug in our side.
Okay, I have prepared a repository with 2 exemplary files that are less complex than the one in the gif under https://github.com/basslerfish/exemplary_files_for_bug_in_spyder.
Steps to reproduce:
b=None to b=a.test() (or simply a. will suffice as well)b=1 or some other valid codeThe error message for line 12 does not disappear after these steps for me.
GIF:

Please let me know if this also occurs for you or just on my side - thank you!
Thanks a lot for your help!! We'll take a look at this soon.
I tried many, many ways to reproduce this and I couldn't.
@basslerfish, another way you can help us to debug this is by opening a terminal and starting Spyder with this command:
spyder --debug-info verbose --debug-output file
After doing that, a file called spyder-debug.log will be generated in the same directory where you ran that command. Please upload it here.
And before closing Spyder, please also go to the the menu Tools > LSP logs (which is only shown in debug mode):

click on the two entries shown on it to open those files in the editor, and upload their contents here too.
Thanks!
Thank you for investing so much time into this.
The error still occurs reliably for me.
I have placed the log files you asked for into the following folder of the same repository: exemplary_files_for_bug_in_spyder/logs/
If there is anything else I can do to help, please let me know!
Hi there,
I also get this problem a lot. It is hard to reproduce as it it quite random.
An example would be striating to type the name of a variable, in the middle of typing LSP would consider that the variable doesn't exist and then never updates.
Restarting it often does the trick.
@basslerfish, sorry for the delay in coming back to you. Could you upload an animated gif from the moment you type spyder in a terminal?
I think I know what the error is in your case but I want to verify it with your gif. Thanks!
Thanks for coming back to this one. Here's the GIF you requested:

FYI, I updated all my packages to the newest version (e.g. spyder 4.1.3, pyflakes 2.2.0, pylint 2.5.2) just before recording this GIF.
Thanks @basslerfish! Could you also post the output of conda list for your environment? Thanks!
No problem! Here's the list: conda_list.txt
@basslerfish, I have good news for you:
So please wait until 4.1.4 is out and let us know if that fixes the problem for you or not.
By the way, 4.1.4 should be released by the end of the week.
@ccordoba12 Thank you very much for taking care of this, I'll make sure to check out 4.1.4!
Just wanted to say that the error does not occur anymore with 4.1.4. Thanks again for taking care of this!
@basslerfish, great news! Thanks for the confirmation!