Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger raising TypeError #261

Closed
LDAP opened this issue May 4, 2024 · 7 comments
Closed

Debugger raising TypeError #261

LDAP opened this issue May 4, 2024 · 7 comments

Comments

@LDAP
Copy link
Contributor

LDAP commented May 4, 2024

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
@daveleroy
Copy link
Owner

daveleroy commented May 4, 2024

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

@LDAP
Copy link
Contributor Author

LDAP commented May 5, 2024

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

@predragnikolic
Copy link
Contributor

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

@daveleroy
Copy link
Owner

python/typing_extensions#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).

@LDAP
Copy link
Contributor Author

LDAP commented May 6, 2024

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

@predragnikolic
Copy link
Contributor

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

@daveleroy
Copy link
Owner

This should be fixed in 0.11.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants