stubPath ..../typings is not a valid directory

Viewed 1135

I am using VS Code 1.54.3 on Ubuntu 20.04 and Pylance 2021.3.2.

I am getting the following output on startup of VS Code:

[Info  - 18:23:18] Pylance language server 2021.3.2 (pyright 85309906) starting
[Info  - 18:23:18] Server root directory: /home/xxx/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist
[Error - 18:23:18] stubPath /home/xxx/Nextcloud/Python/VSCodeProjects/Milestone-2/typings is not a valid directory.
[Error - 18:23:18] stubPath /home/xxx/Nextcloud/Python/VSCodeProjects/import_project/typings is not a valid directory.

Can anybody explain why the messages are displayed and how to fix it?

[Error - 18:23:18] stubPath /home/xxx/Nextcloud/Python/VSCodeProjects/milestone_2_lists/typings is not a valid directory.
[Error - 18:23:19] stubPath /home/xxx/Nextcloud/Python/VSCodeProjects/Database/typings is not a valid directory.
1 Answers

In VS Code settings, look for python.analysis.stubPath and set it to "" instead of "typings".

Related