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

Useless message Stub file not found for "[library]" #724

Open
ruben-adhesif opened this issue Oct 1, 2024 · 3 comments
Open

Useless message Stub file not found for "[library]" #724

ruben-adhesif opened this issue Oct 1, 2024 · 3 comments
Labels
type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules

Comments

@ruben-adhesif
Copy link

When I install and use library (for example pandas), I got this message : Useless message Stub file not found for "pandas"
But when I use a library already install (for example os), I have no issues.

image

I work on VSCodium with Windows 11 andPython 3.12.6, this bug happen with basedpyright but not with pyright

@DetachHead DetachHead added type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules needs investigation awaiting verification by a maintainer that the issue is valid labels Oct 1, 2024
@DetachHead
Copy link
Owner

this bug happen with basedpyright but not with pyright

this is because reportMissingTypeStubs is enabled by default in basedpyright but not pyright. you can check this by setting typeCheckingMode to "strict" in pyright and you'll probably see the same error.

you need to install https://pypi.org/project/pandas-stubs/ to get its types

@DetachHead DetachHead added awaiting response waiting for more info from the author - will eventually close if they don't respond and removed needs investigation awaiting verification by a maintainer that the issue is valid labels Oct 2, 2024
@KotlinIsland
Copy link
Collaborator

perhaps the error message could be expanded?

@ruben-adhesif , what additional information would have helped you here?

@DetachHead
Copy link
Owner

it should probably just guess the name of the stubs package and tell you to try installing it. that would be consistent with what typescript (and i think mypy?) does

@DetachHead DetachHead removed the awaiting response waiting for more info from the author - will eventually close if they don't respond label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules
Projects
None yet
Development

No branches or pull requests

3 participants