This project has moved and is read-only. For the latest updates, please go here.

Error list filled with python errors for files not included in project

Dec 11, 2013 at 3:40 PM
I just installed Python Tools to fix up a build script which was super easy and really nice.

However its now picking up all python scripts that were in the same folder as the one file i modified and it reporting errors for them, even though those files are not in the current project. How can I stop it doing that?

I have a huge number of python 2 scripts that I don't want or need to convert to python 3.

Any pointers appreciated.
Dec 11, 2013 at 6:13 PM
Is the file you modified in the project?

We do have a feature where we automatically include all of the files around a loose file to give you a good intellisense experience. There's no way to disable that currently we just automatically do it. But maybe we should also not report any warnings/errors for files which haven't been opened yet in that case. If including the file in a project doesn't seem like a reasonable workaround (or if it's not working for some reason) please open an issue and we should be able to improve this.
Dec 12, 2013 at 9:17 AM
'If including the file in a project doesn't seem like a reasonable workaround'

Could you explain how this workaround would work? There are currently no python files actually added to my project, it would be great if there was an option to only parse files that are actually in the project. I'll open an issue with this.


: D
Dec 16, 2013 at 5:44 AM
Are you using Python files in a different type of project (like a C++ project)? If so, then the workaround isn't really going to apply.

Basically, when you have a Python project (*.pyproj), we assume that you've told us what you want in terms of relevant files/settings/etc. When you don't have a .pyproj file, we try and guess, which means we sometimes get things wrong.

If your files are predominantly Python 2.x but you have Python 3.x installed, we may be treating them all as Python 3. Changing your default environment to Python 2.x will fix this - if you had a .pyproj then you could use a per-project setting for this, rather than changing a global option.