Closed jackwhelpton closed 2 years ago
Logs if those are useful:
[Info - 10:55:25 AM] (99752) Pylance language server 2022.9.41 (pyright 59bdc42e) starting
[Info - 10:55:25 AM] (99752) Server root directory: /Users/<user>/.vscode-insiders/extensions/ms-python.vscode-pylance-2022.9.41/dist
[Info - 10:55:25 AM] (99752) Starting service instance "<project>"
[Info - 10:55:25 AM] (99752) Notebook support: LSP
[Info - 10:55:25 AM] (99752) Interactive window support: LSP
[Info - 10:55:26 AM] (99752) No configuration file found.
[Info - 10:55:26 AM] (99752) pyproject.toml file found at /Users/<user>/Projects/<project>.
[Info - 10:55:26 AM] (99752) Setting pythonPath for service "<project>": "/Users/<user>/opt/miniconda3/bin/python"
[Info - 10:55:26 AM] (99752) Loading pyproject.toml file at /Users/<user>/Projects/<project>/pyproject.toml
[Info - 10:55:26 AM] (99752) Assuming Python version 3.9
[Info - 10:55:26 AM] (99752) Assuming Python platform Darwin
[Info - 10:55:26 AM] (99752) No include entries specified; assuming /Users/<user>/Projects/<project>
[Info - 10:55:26 AM] (99752) Auto-excluding **/node_modules
[Info - 10:55:26 AM] (99752) Auto-excluding **/__pycache__
[Info - 10:55:26 AM] (99752) Auto-excluding **/.*
[Info - 10:55:26 AM] (99752) Searching for source files
[Info - 10:55:27 AM] (99752) Found 79 source files
[Info - 10:55:27 AM] (99752) Background analysis(1) root directory: /Users/<user>/.vscode-insiders/extensions/ms-python.vscode-pylance-2022.9.41/dist
[Info - 10:55:27 AM] (99752) Background analysis(1) started
[Info - 10:55:29 AM] (99752) [BG(1)] Long operation: analyzing: /Users/<user>/Projects/<project>/src/pipeline.py (2407ms)
[Info - 11:33:20 AM] (99752) No configuration file found.
[Info - 11:33:20 AM] (99752) pyproject.toml file found at /Users/<user>/Projects/<project>.
[Info - 11:33:20 AM] (99752) Setting pythonPath for service "<project>": "/Users/<user>/opt/miniconda3/bin/python"
[Info - 11:33:20 AM] (99752) Loading pyproject.toml file at /Users/<user>/Projects/<project>/pyproject.toml
[Info - 11:33:20 AM] (99752) Assuming Python version 3.9
[Info - 11:33:20 AM] (99752) Assuming Python platform Darwin
[Info - 11:33:20 AM] (99752) No include entries specified; assuming /Users/<user>/Projects/<project>
[Info - 11:33:20 AM] (99752) Auto-excluding **/node_modules
[Info - 11:33:20 AM] (99752) Auto-excluding **/__pycache__
[Info - 11:33:20 AM] (99752) Auto-excluding **/.*
[Info - 11:33:20 AM] (99752) Searching for source files
[Info - 11:33:20 AM] (99752) Found 79 source files
[Info - 11:34:58 AM] (99752) No configuration file found.
[Info - 11:34:58 AM] (99752) pyproject.toml file found at /Users/<user>/Projects/<project>.
[Info - 11:34:58 AM] (99752) Setting pythonPath for service "<project>": "/Users/<user>/opt/miniconda3/bin/python"
[Info - 11:34:58 AM] (99752) Loading pyproject.toml file at /Users/<user>/Projects/<project>/pyproject.toml
[Info - 11:34:58 AM] (99752) Assuming Python version 3.9
[Info - 11:34:58 AM] (99752) Assuming Python platform Darwin
[Info - 11:34:58 AM] (99752) No include entries specified; assuming /Users/<user>/Projects/<project>
[Info - 11:34:58 AM] (99752) Auto-excluding **/node_modules
[Info - 11:34:58 AM] (99752) Auto-excluding **/__pycache__
[Info - 11:34:58 AM] (99752) Auto-excluding **/.*
[Info - 11:34:58 AM] (99752) Searching for source files
[Info - 11:34:58 AM] (99752) Found 79 source files
[Info - 11:37:15 AM] (99752) No configuration file found.
[Info - 11:37:15 AM] (99752) pyproject.toml file found at /Users/<user>/Projects/<project>.
[Info - 11:37:15 AM] (99752) Setting pythonPath for service "<project>": "/Users/<user>/opt/miniconda3/bin/python"
[Info - 11:37:15 AM] (99752) Loading pyproject.toml file at /Users/<user>/Projects/<project>/pyproject.toml
[Info - 11:37:15 AM] (99752) Assuming Python version 3.9
[Info - 11:37:15 AM] (99752) Assuming Python platform Darwin
[Info - 11:37:15 AM] (99752) No include entries specified; assuming /Users/<user>/Projects/<project>
[Info - 11:37:15 AM] (99752) Auto-excluding **/node_modules
[Info - 11:37:15 AM] (99752) Auto-excluding **/__pycache__
[Info - 11:37:15 AM] (99752) Auto-excluding **/.*
[Info - 11:37:16 AM] (99752) Searching for source files
[Info - 11:37:16 AM] (99752) Found 79 source files
Have you opened the files that are showing the error? If the file is opened, then you will see these errors. Is they are not opened, then you should not see the errors.
Please reopen this issue if you are still seeing the error when the file is not opened.
Yes, this is regardless of whether the files are opened or not. I understand that any errors in opened files will always be shown.
Do I have permission to reopen this issue? I'm not seeing the option...
the log you shared, did you set the python.analysis.logLevel
to Trace
? It doesn't show what files are actually analyzed or not.
I didn't, but I've added that setting now, so here are the full logs:
Environment data
Repro Steps
Analysis enabled at workspace level:
Several errors in the bundled
spipy
stubs are showing up, of the form"PyCapsule" is not defined
.These files are in
"~/.vscode-insiders/extensions/ms-python.vscode-pylance-2022.9.41/dist/bundled/stubs/scipy-stubs/spatial/ckdtree.pyi"
. When analyzing an open directory I wouldn't expect errors in stubs defined in VS Code's own folders to be included.I've tried excluding these using
python.analysis.ignore
andpython.analysis.exclude
, with full absolute paths, relative paths, wildcards... but regardless of what is tried these errors still show up. An example of what I've tried:Deleting the bundled stubs resolves the problem until PyLance is next updated, but this has to be repeated every time. Ideally I'd like a way to globally exclude these bundled stubs from a workspace analysis.