Closed rchl closed 1 year ago
Should mention that that was with "pyright.dev_environment": "sublime_text_33"
set.
With "pyright.dev_environment": "sublime_text"
there is another error:
Traceback (most recent call last):
File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 298, in on_api_ready
plc()
File "/Users/rafal/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/main.py", line 26, in plugin_loaded
load_handlers()
File "/Users/rafal/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/registry.py", line 59, in load_handlers
register_language_handler(handler)
File "/Users/rafal/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/registry.py", line 65, in register_language_handler
config = handler.config
File "/Users/rafal/Library/Application Support/Sublime Text 3/Lib/python3.3/lsp_utils/_client_handler/language_handler.py", line 94, in config
self.on_settings_changed(client_config.settings)
File "/Users/rafal/Library/Application Support/Sublime Text 3/Installed Packages/LSP-pyright.sublime-package/plugin.py", line 59, in on_settings_changed
py_ver = self.detect_st_py_ver(dev_environment)
File "/Users/rafal/Library/Application Support/Sublime Text 3/Installed Packages/LSP-pyright.sublime-package/plugin.py", line 142, in detect_st_py_ver
session = self.weaksession()
AttributeError: 'LspPyrightPlugin' object has no attribute 'weaksession'
Hmm... what's the way to get workspace folders (or window) of the session if there is no weaksession
for ST 3 LSP?
Or maybe just remove sublime_text
(and sublime_text_38
) since it makes less sense that a user uses ST 3 to edit a py38 ST 4 plugin.
Or maybe just remove
sublime_text
(andsublime_text_38
) since it makes less sense that a user uses ST 3 to edit a py38 ST 4 plugin.
Fixed in st3-1.2.42
.
It might be happening only with PC4 but not entirely sure. This code crashes:
https://github.com/sublimelsp/LSP-pyright/blob/8eb42312621efce4efabd421845ed56369422d33/plugin.py#L164-L182
with: