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

TypeError: 'None' comparison in collect_try_except_info() #1720

Closed
Sorontik opened this issue Nov 4, 2024 · 1 comment · Fixed by #1721
Closed

TypeError: 'None' comparison in collect_try_except_info() #1720

Sorontik opened this issue Nov 4, 2024 · 1 comment · Fixed by #1721
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@Sorontik
Copy link

Sorontik commented Nov 4, 2024

Hello,

when an exception occured in my Program, i got this output in the debug console:

79.61s - Error collecting try..except info from source (src/main.py)
Traceback (most recent call last):
File "c:\Users<username>.vscode\extensions\ms-python.debugpy-2024.12.0-win32-x64\bundled\libs\debugpy_vendored\pydevd\pydevd.py", line 796, in collect_try_except_info
if line > max_line:
^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'NoneType' and 'int'

Unfortunately, the Program is rather complex and i was unable to reproduce this error in a simplified Version of my script.

This did not happen previously, so it might be related to the changes in one of the last releases (I'm currently on v2024.12.0 which should be the latest - on a up-to-date VS-Code)

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python-debugger Nov 4, 2024
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Nov 4, 2024
@rchiodo
Copy link
Contributor

rchiodo commented Nov 4, 2024

Thanks for the issue. This was caused by changes in 3.12. Similar to this issue here:
#1708

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants