lsp-pyright icon indicating copy to clipboard operation
lsp-pyright copied to clipboard

Local modules are not resolved on OS X.

Open adamczykm opened this issue 3 years ago • 4 comments

Emacs lsp-pyright is not able to resolve my project's modules. The issue is not present when I'm running it manually from the shell.

This is my project's structure

.
├── ep
│   ├── api
│   ├── metrics
├── ...
├── pyrightconfig.json
├── ...

This is my pyrightconfig.json


{
    "include":["ep"],
    "pythonPlatform": "Darwin",
}

On every module starting with path ep.xxx I get: Import "ep.xxx" could not be resolved.

adamczykm avatar Sep 21 '20 15:09 adamczykm

You may need to set ["ep", "ep/api", "ep/metrics"]? Also try lsp-pyright-extra-paths?

seagle0128 avatar Sep 22 '20 17:09 seagle0128

I've tried those. I think we should focus that given the same config, calling pyright from shell works. But emacs package is doing something else apparently.

adamczykm avatar Sep 27 '20 15:09 adamczykm

What are the versions of the pyright used by emacs and shell? Also could you share the lsp-log?

zeronone avatar Sep 28 '20 00:09 zeronone

I am having the same problem. For some reason it will recognize the relative import though.

jzw2 avatar May 11 '21 22:05 jzw2