Import "test" could not be resolved
See original GitHub issuecoc-pyright is unable to resolve imports when importing a local file, such as
# main.py
from test import *
(both main.py
and test.py
are in the same directory)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
"pytest" is not accessed / Import "pytest" could not be resolved ...
So I'm using pylance and pipenv as my shell. I have pytest installed in my local env, I can run pytest from the...
Read more >How to fix Import could not be resolved from source Pylance
How to fix Import could not be resolved from source Pylance in this video tutorial I'll teach you how can you solve your...
Read more >Import could not be resolved [Pylance] : r/vscode - Reddit
14 votes, 12 comments. I'm trying to use torch in a python script but even though it's pip installed, pylance doesn't recognize it…...
Read more >ModuleNotFoundError: no module named Python Error [Fixed]
Python here can be any module. Here's an error when I try to import a numpys module that cannot be found: import numpys...
Read more >Import "requests" could not be resolved from source Pylance
Encountered error in Visual Studio Code (on Windows machine) while writing first line of a program which was "import requests".
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same issue. Since I was working in a subdirectory of an git repository, it seems that CoC will consider that parent dir was the root. Solved by following instructions here: https://github.com/neoclide/coc.nvim/wiki/Using-workspaceFolders
@rodorgas Is there a way to set the current directory as a root? That’ll help a lot when working on mono repos.