Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stubPath .... is not a valid directory #1075

Closed
orloff34 opened this issue Mar 21, 2021 · 7 comments
Closed

stubPath .... is not a valid directory #1075

orloff34 opened this issue Mar 21, 2021 · 7 comments
Labels
fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@orloff34
Copy link

orloff34 commented Mar 21, 2021

I am new with python and VS Code. I am using VS Code 1.54.3 with Ubuntu 20.04 and Pylance 2021.3.2 and I am getting following output at start-up of VS Code:

Info - 09:16:30] Pylance language server 2021.3.2 (pyright 85309906) starting
[Info - 09:16:30] Server root directory: /home/xxx/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist
[Info - 09:16:30] Background analysis(3) root directory: /home/xxx/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist
[Info - 09:16:30] Background analysis(3) started
[Info - 09:16:30] Background analysis(4) root directory: /home/xxx/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist
[Error - 09:16:30] stubPath /home/xxx/Nextcloud/Python/VSCodeProjects/Milestone-2/typings is not a valid directory.
[Error - 09:16:30] stubPath /home/xxx/Nextcloud/Python/VSCodeProjects/import_project/typings is not a valid directory.
[Error - 09:16:31] stubPath /home/xxx/Nextcloud/Python/VSCodeProjects/milestone_2_lists/typings is not a valid directory.
[Error - 09:16:31] stubPath /home/xxx/Nextcloud/Python/VSCodeProjects/Database/typings is not a valid directory.

Can you explain why this is displayed and how to solve the problem.

@jakebailey
Copy link
Member

This isn't a real error; you don't need a typings directory to work so you can ignore it.

I think "error" is a bit too strong for this message; perhaps we can just change it to a warning.

@jakebailey jakebailey added the needs decision Do we want this enhancement? label Mar 22, 2021
@github-actions github-actions bot removed the triage label Mar 22, 2021
@erictraut
Copy link
Contributor

I like the suggestion of changing this from an error to a warning. That should help reduce confusion about this message. I just made that change.

@jakebailey jakebailey added fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed needs decision Do we want this enhancement? labels Mar 22, 2021
@jakebailey
Copy link
Member

Thanks, that's all we need. 🙂

@jakebailey
Copy link
Member

This issue has been fixed in version 2021.3.3, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202133-24-march-2021

@ssbarnea
Copy link

ssbarnea commented Feb 7, 2023

@jakebailey That bug should have not being closed because even a warning is confusing, especially when there is nothing the user can to get this sorted.

Setting the settings to empty string does not silence this message. If the user changes the vscode user settings, they will get an additional message The stubPath has been specified in both the config file and the client settings. The value in the config file (...) will take precedence.

That drives me crazy as even setting it to another existing folder does not silence the language server. I tried .tox and I got stubPath .tox is not a valid directory..

@debonte
Copy link
Contributor

debonte commented Feb 7, 2023

@ssbarnea, this issue is ancient. Please file a new issue if there is a current behavior you would like addressed.

@erictraut
Copy link
Contributor

This is a duplicate of microsoft/pyright#777 (comment) in the pyright issue tracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

5 participants