Closed aimanyusra closed 6 months ago
Additional logging included below (just scrolled down after I posted this)
Traceback (most recent call last):
File "/Users/AIMAN.YUSRA/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/windows.py", line 479, in _update_panel_main_thread
panel.run_command("lsp_update_panel", {"characters": characters})
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime.py", line 1380, in run_command
sublime_api.view_run_command(self.view_id, cmd, args)
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1490, in run_
self.view.end_edit(edit)
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime.py", line 1341, in end_edit
sublime_api.view_end_edit(self.view_id, edit.edit_token)
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 924, in on_modified
run_view_callbacks('on_modified', view_id)
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 708, in run_view_callbacks
callback(v, *args)
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 152, in profiler
return event_handler(*args)
File "/Users/AIMAN.YUSRA/Library/Application Support/Sublime Text/Packages/SublimeCodeIntel/SublimeCodeIntel.py", line 1439, in on_modified
sublime_scope = getSublimeScope(view)
File "/Users/AIMAN.YUSRA/Library/Application Support/Sublime Text/Packages/SublimeCodeIntel/SublimeCodeIntel.py", line 391, in getSublimeScope
sel = view_sel[0]
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime.py", line 1072, in __getitem__
raise IndexError()
IndexError
Traceback (most recent call last):
File "/Users/AIMAN.YUSRA/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/windows.py", line 479, in _update_panel_main_thread
panel.run_command("lsp_update_panel", {"characters": characters})
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime.py", line 1380, in run_command
sublime_api.view_run_command(self.view_id, cmd, args)
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1490, in run_
self.view.end_edit(edit)
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime.py", line 1341, in end_edit
sublime_api.view_end_edit(self.view_id, edit.edit_token)
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 932, in on_selection_modified
run_view_callbacks('on_selection_modified', view_id)
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 708, in run_view_callbacks
callback(v, *args)
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 152, in profiler
return event_handler(*args)
File "/Users/AIMAN.YUSRA/Library/Application Support/Sublime Text/Packages/SublimeCodeIntel/SublimeCodeIntel.py", line 1520, in on_selection_modified
rowcol = view.rowcol(view_sel[0].end())
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime.py", line 1072, in __getitem__
raise IndexError()
IndexError
These are issues with LSP and SublimeCodeIntel and lsp_utils most likely
File "/Users/AIMAN.YUSRA/Library/Application Support/Sublime Text/Lib/python33/lsp_utils/__init__.py", line 6, in <module>
from .generic_client_handler import GenericClientHandler
File "/Users/AIMAN.YUSRA/Library/Application Support/Sublime Text/Lib/python33/lsp_utils/generic_client_handler.py", line 9, in <module>
from package_control import events # type: ignore
ImportError: cannot import name events
File "/Users/AIMAN.YUSRA/Library/Application Support/Sublime Text/Installed Packages/LSP.sublime-package/plugin/core/windows.py", line 479, in _update_panel_main_thread
panel.run_command("lsp_update_panel", {"characters": characters})
File "/Users/AIMAN.YUSRA/Library/Application Support/Sublime Text/Packages/SublimeCodeIntel/SublimeCodeIntel.py", line 1439, in on_modified
sublime_scope = getSublimeScope(view)
File "/Users/AIMAN.YUSRA/Library/Application Support/Sublime Text/Packages/SublimeCodeIntel/SublimeCodeIntel.py", line 391, in getSublimeScope
sel = view_sel[0]
@TerminalFi I'll try to remove the offending packages and reinstalling them, to see how it goes
@TerminalFi I'll try to remove the offending packages and reinstalling them, to see how it goes
How did it go?
@TerminalFi I'll try to remove the offending packages and reinstalling them, to see how it goes
How did it go?
No dice, tried removing the offending packages and tried to reinstall everything from scratch didn't work as well. Will keep looking for other solutions in the mean time.
Having error logs does help. In case they are different. Does any other LSP-* package work?
What's the result of executing from package_control import events
in your python 3.3 ST console?
I also ran into this and it is very likely to be related to upgrading Package Control to version 4 (beta) which seems to be necessary to get Package Control working again in Sublime Text and recent macOS versions.
While only a bandaid, you can get it to work again by commenting out three lines in ~/Library/Application Support/Sublime Text/Lib/python33/lsp_utils
:
--- generic_client_handler.py
+++ generic_client_handler.py
@@ -6,7 +6,7 @@
from LSP.plugin import DottedDict
from LSP.plugin import WorkspaceFolder
from LSP.plugin.core.typing import Any, Dict, List, Optional, Tuple
-from package_control import events # type: ignore
+#from package_control import events # type: ignore
import os
import shutil
import sublime
@@ -46,8 +46,8 @@
if os.path.isdir(cls.package_storage()):
shutil.rmtree(cls.package_storage())
- if events.remove(cls.package_name):
- sublime.set_timeout_async(run_async, 1000)
+ #if events.remove(cls.package_name):
+ # sublime.set_timeout_async(run_async, 1000)
super().cleanup()
@classmethod
As far as I understand it, the above change only removes an async call to run_async
if the lsp-copilot package is being uninstalled, so for normal operation it should be fine.
The new Package Control source is in https://github.com/wbond/package_control/blob/four-point-oh, likely there is a better way to solve this.
It's likely an issue with wrongly named Package Control package.
@akirk can you list the directory contents of your ~/Library/Application Support/Sublime Text/Installed Packages/
?
I would not say that. I purposefully replaced Package Control.sublime-package
with the 4.0 version because otherwise Package Control would not work. There is only one entry related to Package Control:
-rw-r--r--@ 1 alex staff 509K Oct 20 07:27 Package Control.sublime-package
Yeah, that looks right. By default there is a dot instead of space in name when downloading from github so I thought that's the problem.
And BTW you are sure that it's a latest version?
Some explation about causes is given in https://github.com/wbond/package_control/issues/1656.
For those being effected can you please try the following 2 things, just to make sure the problem still exists in latest available PC4.0-beta8 release?
~/Library/Application Support/Sublime Text/Libs/python33/package_control.py
and that for python38 as well and restart ST (maybe twice) so PC recreates them with latest release. (should happen automatically, but just to be sure).With the technical reason for that issue in mind, lsp_utils could work around it by not importing the module globally, but by following https://packagecontrol.io/docs/events and import it locally in GenericClientHandler.cleanup()
method. This would ensure import taking place not before all packages have been loaded.
Experiencing the same issue here; commenting out the lines that @akirk mentioned, except in the file Library/Application Support/Sublime Text/Lib/python33/lsp_utils/generic_client_handler.py
, fixed the issue for me.
I recently ran an update for ST and was required to update node as well, fixed the issue for me. I honestly can't remember any steps to replicate because I wasn't expecting it to fix the issue lol
Hi, I'm having issues loading copilot after installing it using Package Control. Below is what I can see with ST trying to load the plugin.
Is this an issue with python or something? I have other packages installed and they seem to be loading fine though
Below is also a screenshot of what happens when I type
Copilot
on the command palette