Sublime Forum

ImportError: No module named 'LSP'

#1

Trying to create a new language server plugin: https://github.com/aireilly/LSP-harper-ls

I’m getting an error:

reloading python 3.3 plugin LSP-harper-ls.plugin
Traceback (most recent call last):
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 308, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 1686, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/home/aireilly/.config/sublime-text/Installed Packages/LSP-harper-ls.sublime-package/plugin.py", line 8, in <module>
ImportError: No module named 'LSP'

Why am I seeing this? the import line is
from LSP.plugin import AbstractPlugin, register_plugin, unregister_plugin

which I see in other plugin.py implmentations.

0 Likes

#2

reloading python 3.3 plugin LSP-harper-ls.plugin

it should use py38

1 Like

#3

Thanks yes I set 3.8 in ./.python-version to correct it.

0 Likes