Useless message Stub file not found for "[library]"
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.
I work on VSCodium with Windows 11 andPython 3.12.6, this bug happen with basedpyright but not with pyright
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
perhaps the error message could be expanded?
@ruben-adhesif , what additional information would have helped you here?
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
perhaps the error message could be expanded?
@ruben-adhesif , what additional information would have helped you here?
If I may offer my own reply to this question as this thread is a little old, I just got this error for the package nltk, and python not being my main language, what would help me is a general methodology around finding and installing these stubs packages. I'm on pypi trying to find something like nltk-stubs, but no luck.
I go to nltk's github and search issues, and there it is. They're still talking about stubs and types; it doesn't sound like they have added typing yet, but maybe there's somewhere else an experienced user might go to check? In TypeScript, for example, I learned one could generally install type packages from @types/<package_name> if it wasn't bundled with the JavaScript package itself.
I imagine for python stubs there might be a similar learned methodology, that I think would benefit the end user to see in this Stub not found error.
python differs from typescript in that most 3rd party stubs are already bundled with typeshed, so it's more likely that whenever you encounter this error it means there's no stubs to install. pandas seems to be an exception because it's stubs are maintained in a separate repository to typeshed
Good to know, thanks. And thanks for this library, BTW!