sublimelsp / LSP-pyright

Python support for Sublime's LSP plugin provided through microsoft/pyright.
MIT License
131 stars 13 forks source link

LSP-pyright crashed with `AttributeError` #230

Closed deathaxe closed 1 year ago

deathaxe commented 1 year ago

Got the following traceback when opening a python file of a ST package with .python-version in its root.

LSP: LSP-pyright crashed (4 / 5 times in the last 180.0 seconds), exit code 1, exception: None
LSP-pyright: WARN: .python-version detected but pyenv not found
LSP-pyright: Using python path "python"
Error handling request
Traceback (most recent call last):
  File "C:\Apps\Sublime Text 40xx\Data\Installed Packages\LSP.sublime-package\plugin/core/sessions.py", line 2081, in on_payload
    handler(result, req_id)
  File "C:\Apps\Sublime Text 40xx\Data\Installed Packages\LSP.sublime-package\plugin/core/sessions.py", line 1804, in m_client_registerCapability
    watcher = self._watcher_impl.create(folder.path, [pattern], kind, ignores, self)
  File "C:\Apps\Sublime Text 40xx\Data\Installed Packages\LSP-file-watcher-chokidar.sublime-package\watcher.py", line 92, in create
    return file_watcher.register_watcher(root_path, patterns, events, ignores, handler)
  File "C:\Apps\Sublime Text 40xx\Data\Installed Packages\LSP-file-watcher-chokidar.sublime-package\watcher.py", line 120, in register_watcher
    self._on_watcher_added(root_path, patterns, events, ignores, handler)
  File "C:\Apps\Sublime Text 40xx\Data\Installed Packages\LSP-file-watcher-chokidar.sublime-package\watcher.py", line 133, in _on_watcher_added
    self._start_process()
  File "C:\Apps\Sublime Text 40xx\Data\Installed Packages\LSP-file-watcher-chokidar.sublime-package\watcher.py", line 175, in _start_process
    process = node_runtime.run_node(
AttributeError: 'NodeRuntimePATH' object has no attribute 'run_node'

LSP: LSP-pyright crashed (5 / 5 times in the last 180.0 seconds), exit code 1, exception: None
jfcherng commented 1 year ago

Most likely lsp_utils is not updated. Can you try to manually update it?

deathaxe commented 1 year ago

Sounds reasonable

deathaxe commented 1 year ago

Thanks!

Still had 2.0.0 installed due to my custom python 3.8 channels.