SublimeDebugger icon indicating copy to clipboard operation
SublimeDebugger copied to clipboard

Debugger raising TypeError

Open LDAP opened this issue 9 months ago • 1 comments

Debugger does not start and logs:

Traceback (most recent call last):
  File "/home/lucas/.config/sublime-text/Packages/Debugger/modules/debugger.py", line 69, in get
    instance = Debugger(window, skip_project_check=skip_project_check)
  File "/home/lucas/.config/sublime-text/Packages/Debugger/modules/debugger.py", line 90, in __init__
    self.on_session_output = core.Event[dap.Session, dap.OutputEvent]()
  File "./python3.8/typing.py", line 261, in inner
  File "./python3.8/typing.py", line 897, in __class_getitem__
  File "/home/lucas/.config/sublime-text/Lib/python38/typing_extensions.py", line 2691, in _check_generic
    raise TypeError(f"Too {'many' if alen > elen else 'few'} {things}"
TypeError: Too many parameters for <class 'Debugger.modules.core.event.Event'>; actual 2, expected 1

LDAP avatar May 04 '24 09:05 LDAP

Where are you getting the typing_extensions library from because that seems like a bug in the implementation to me

daveleroy avatar May 04 '24 20:05 daveleroy

I didn't do anything special so it must be shipped with ST or package control.

LDAP avatar May 05 '24 08:05 LDAP

LSP added typing_extensions this Friday as a dependency -> https://github.com/sublimelsp/LSP/releases/tag/4070-2.0.1

So I would assume that this is the origin how LDAP got typing_extensions

predragnikolic avatar May 05 '24 08:05 predragnikolic

https://github.com/python/typing_extensions/issues/126 is the feature that is missing.

Anyone doing something similar by trying to import typing_extensions when its available (such as doing type checking) and uses a feature this library doesn't support is going to break (probably only this package tbh).

daveleroy avatar May 05 '24 19:05 daveleroy

Is there a quick workaround since I need currently both LSP and Debugger?

LDAP avatar May 06 '24 07:05 LDAP

@daveleroy If you want I could revert the last LSP release for the time being(until a fix for this is found)?

predragnikolic avatar May 06 '24 13:05 predragnikolic

This should be fixed in 0.11.3

daveleroy avatar May 07 '24 00:05 daveleroy