-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Pyright cannot resolve the wandb
module import, although it can resolve every other import.
#787
Comments
Thank you for replying this fast. Here's... something: The file A few minutes of testing later...Okay, I think I figured this out: creating a folder with the same name as the module in the working directory creates this error. The initial scenario had a
import wandb
print(wandb.__version__) |
Thanks for the additional clues. This is a bug in Pyright's import resolution code. It should always favor a third-party library import if a local import can't be found. A fix will be included in the next version of Pyright. |
This is addressed in Pyright 1.1.49, which I just published. |
Describe the bug
Pyright cannot resolve the
wandb
module import, although it can resolve every other import.To Reproduce
I am using poetry, but running pyright directly from the command line (inside the venv) results in the same problem.
wandb
in a file, alongside any other installed dependency, say,sklearn
sklearn
import, but notwandb
error: Import "wandb" could not be resolved (reportMissingImports)
Expected behavior
Pyright can resolve the
wandb
import correctlyScreenshots or Code
Log from `pyright --verbose`
VS Code extension or command-line
This happens with Pylance 2020.6.1 and pyright 1.1.48
Additional context
What strikes me as odd is that pyright can find the module (
Resolved import with file [...]
), but for some reason, it still doesn't resolve it.The text was updated successfully, but these errors were encountered: