Spyder 4.0.1 issues

1605
10
02-10-2020 11:38 AM
JoeBorgione
MVP Emeritus

One of the things I like most about the Spyder IDE is it flags syntax errors as you go.  However, that does not seem to be the case in the version I upgraded to: 4.0.1.

Here is a screen cap of what I'm talking about:

Line 8 should have the warning that os is imported but not used. Lines 20,21, and 24 should be syntax errors as well. Is there a setting I've missed?

Dan Patterson

That should just about do it....
Tags (1)
0 Kudos
10 Replies
DanPatterson_Retired
MVP Emeritus

Joe Borgione

What I use

Preferences... Completion and Linting, Linting, Enable basic linting checked on and the McCabe thing checked on.

The rest you will have to play around with to suit your needs.

I didn't do the Kite thing since I really hate those things that try to help when you don't need it (waiter trying to fill your glass while you are drinking kind of thing)

0 Kudos
JoeBorgione
MVP Emeritus

I'll take a look...

...waiter trying to fill your glass while you are drinking kind of thing...   Why is it as soon as you have a mouthful of food, the server stops by and asks 'How is everything?'

That should just about do it....
0 Kudos
JoeBorgione
MVP Emeritus

Got at least one syntax error to show up, but that's about it; I reset it to factory and then started picking and choosing.  something is not right though....

In this script I don't use datetime; everything between 11 and 20 is problematic....

That should just about do it....
0 Kudos
DanPatterson_Retired
MVP Emeritus

perhaps if  one would post a snippet instead of a screengrab   one might be able to copy and paste it in their spyder 4.0.1 for testing .... hmmmm???

0 Kudos
DanPatterson_Retired
MVP Emeritus

0 Kudos
DanPatterson_Retired
MVP Emeritus

There is an open issue on github

Code completion and linting stop working during the current session · Issue #11026 · spyder-ide/spyd... 

Try a restart to see if linting returns.  

A few other issues about lagginess, but I suspect you don't have 20,000 lines of code open at once(?)

Don't upgrade 'parso' until it is confirmed

0 Kudos
JoeBorgione
MVP Emeritus

Dan-  I didn't bother pasting the code, as the errors were pretty obvious:  here's a copy none the less:

"""
Created on Mon Feb 10 12:17:17 2020

@author: jborgione
"""
import arcpy
import os
import datetime
x = 'abcd'
x =

x = some obvious error in code....

 varX = 'indent'


for j in someList:
    print(w)

After a little tweaking per your suggestions, I'm getting a few more warnings but not what I'm used to seeing.  Here is a screen cap of the complete script.  The upper stuff is what I pasted above, the warnings at line 36,38,40, and 43 are complaining about lack of white space or too much white space...

That should just about do it....
0 Kudos
DanPatterson_Retired
MVP Emeritus

pasted what you posted and lines 11, 15 and since there were 3 blank lines after line 19 , I got an error there.

The other warnings that you got are because you don't have a space after a comma.

line 13 doesn't error out because line 11 has an error (no point in pointing out more until that one is fixed.

You can suppress warnings that aren't part of your code style using the "pylint disable " lines that I posted in the image.

Remember for the most part pycode style are recommendations not rules.

If you want, I can send you my spyder.ini file.

When you get the a script running without errors, you can run Static Code Analysis (Source Tab, or hit F8) to get a line-by-line assessment

0 Kudos
DanPatterson_Retired
MVP Emeritus

Joe 4.1.2 is out and good if you haven't updates‌  conda update blah --no-pin

0 Kudos