-
Notifications
You must be signed in to change notification settings - Fork 41
Unresolved import problems #96
Comments
|
Yes, it is set.
|
Can you provide example files for troubleshootings? |
Sorry, just tried to reproduce on a vanilla example, but was unable to. It always worked as expected. However, at my original project it still fails. I tried to delete my lsp-sessions and the ~/.emacs.d/.cache directory. LSP now asks to reinstall the server and fails with the same message I have described in the other issue. Sorry, no helpful news. I keep trying and try to investigate. |
Updating to the latest version will address the downloading issue. |
I think I am able to reproduce this issue. I have attached a simple python project:
it works (runs) when I set the |
Please update to the latest and use this setting: (setq-default lsp-python-ms-extra-paths '("/Users/vincent/Desktop/mspyls/subdir")) |
Hello,
I use |
Same issue here. Although I use Setting |
Nothing changes. With As I mentioned before,
|
It does work on my both laptops, with the sample project mspyls.zip. |
Yes, that works since |
I do believe you didn't set the proper workspace root. The behavior is same as VSCode exactly. Read the manual of Here is my screenshot: |
I do believe you didn't read the comments carefully. The project is
Why would I have to set all sub-directories to individual workspaces? Any script in
However, scripts in sub-directories of
in This is exactly the same example given by @floli . One just can not import |
@Isolet Did you try with the example provided by @floli ? If you set root to
In the case above, I agree the root should
Generally there is no difference between |
modify
I set
|
@seagle0128 |
@wsw0108 Thank you. I've committed a patch to make |
@seagle0128 I have create a PR for this, please review it. |
I suffer from this issue too, but in my case the root cause is the root folder setting is not correct. The method to test what is the root folder for a file is You need to trun on the synchronize treemacs projects with lsp-mode workspace folders follow lsp-treemacs manul |
I had a weird situation where only some of my installed libraries were resolved, as in numpy was found but h5py and sklearn were not. I already had a .env file setup for use with nvim/coc so I tried setting |
i run into this issue because i manage my python virtualenvironments through pyenv. Since this took me a while to get correct, i will try to summarize my findings.
In the Attention: the suggestoin from @tm-schwartz did not completly work for me, since the " caused some sideeffects. Therefore, in the .env, paths must be without ".
|
For anyone following #96 (comment), make sure to use absolute path. Don't use |
Hello,
my Python LSP configuration is:
Now I have a line in a python file that gives an unresolved import:
I validate that path above should fix the unresolved import by
Still, Python LSP gives me an
unresolved import 'mypackage'
Versions:
What can still be wrong at my setup?
Thanks!
The text was updated successfully, but these errors were encountered: