Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Unresolved import problems #96

Closed
Closed
@floli

Description

@floli

Hello,

my Python LSP configuration is:

(use-package lsp-python-ms
  :ensure t
  :config (progn
            (setq lsp-python-ms-extra-paths '("/path_to_package/mypackage/src/")))
  :hook (python-mode . lsp))

Now I have a line in a python file that gives an unresolved import:

import mypackage.helper.glog as log

I validate that path above should fix the unresolved import by

$ unset PYTHONPATH 
$ python
Python 2.7.17 (default, Apr 15 2020, 17:20:14) 

>>> import mypackage.helper.glog as log
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named mypackage.helper.glog

>>> import sys
>>> sys.path.append("/path_to_package/mypackage/src/")

>>> import mypackage.helper.glog as log
>>> [no error message]

Still, Python LSP gives me an unresolved import 'mypackage'

Versions:

  • GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32) of 2020-05-07
  • LSP as of today from MELPA

What can still be wrong at my setup?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions