You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After python debug was automatically updated to version v2024.12.0, this error was reported during debugging. When I rolled back to the previous version, it worked normally.
Error message
ERROR: Exception in ASGI application
Traceback (most recent call last):
......
cfunc.to_py.__Pyx_CFunc_7f6725__29_pydevd_sys_monitoring_cython_object__lParen__etc_to_py_4code_11from_offset_9to_offset.wrap
File "_pydevd_sys_monitoring\\_pydevd_sys_monitoring_cython.pyx", line 1367, in _pydevd_sys_monitoring_cython._jump_event
TypeError: an integer is required
Reacted by MikeM, Diego Caravana, Roberto Pastor Muela, Domenic Gosein, FedericoHeichou, default-writer and Dave Tapley
After python debug was automatically updated to version v2024.12.0, this error was reported during debugging. When I rolled back to the previous version, it worked normally.
Error message
ERROR: Exception in ASGI application
Traceback (most recent call last):
......
cfunc.to_py.__Pyx_CFunc_7f6725__29_pydevd_sys_monitoring_cython_object__lParen__etc_to_py_4code_11from_offset_9to_offset.wrap
File "_pydevd_sys_monitoring\\_pydevd_sys_monitoring_cython.pyx", line 1367, in _pydevd_sys_monitoring_cython._jump_event
TypeError: an integer is required
Does anybody have an example application that reproduces the problem?
In my case, I'm making an odoo module, using vscode debugger, put breakpoint, trigger it. After some debugging, this error sometimes shows several seconds I pause, sometimes right after I unpause the debug
Running in Win10/WSL2 with Python 3.12.
VSCode Python Debugger 2024.12.0
I encountered the TypeError: an integer is required exception in my project. Based on the original code where I first found it, I was able to simplify the code triggering the exception down to:
try:
# Generate any exception here.
a = 1/0
except:
try:
# Try something else that works. Nested try statements appear to be necessary.
a = 1
except:
pass
# Setting a breakpoint here generates the TypeError exception.
b = 2
# This line seems to be required, i.e., the TypeError exception is generated if this line
# is present, but not if it is commented out.
c = 3
Here is the traceback.
Traceback (most recent call last):
File "/usr/local/lib/python3.12/runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/runpy.py", line 88, in _run_code
exec(code, run_globals)
File "/home/john/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/main.py", line 71, in
cli.main()
File "/home/john/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 501, in main
run()
File "/home/john/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 351, in run_file
runpy.run_path(target, run_name="main")
File "/home/john/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 310, in run_path
return _run_module_code(code, init_globals, run_name, pkg_name=pkg_name, script_name=fname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/john/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 127, in _run_module_code
_run_code(code, mod_globals, init_globals, mod_name, mod_spec, pkg_name, script_name)
File "/home/john/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 118, in _run_code
exec(code, run_globals)
File "/home/john/vsc_projects/hello/VSCode debug bug 2024_10_22.py", line 12, in
b = 2
^
File "", line 69, in cfunc.to_py.__Pyx_CFunc_7f6725__29_pydevd_sys_monitoring_cython_object__lParen__etc_to_py_4code_11from_offset_9to_offset.wrap
File "_pydevd_sys_monitoring\_pydevd_sys_monitoring_cython.pyx", line 1367, in _pydevd_sys_monitoring_cython._jump_event
TypeError: an integer is required
imgparts="joxit/docker-registry-ui:latest".split('/')
try:
img,tag=imgparts[-1].split('@')
exceptValueError:
try:
img,tag=imgparts[-1].split(':')
exceptValueError:
img=imgparts[-1]
# finally: # print("end")print(123) # add breakpoint here, but TypeError will not occur if two lines (the finally arm) above uncommented
Traceback (most recent call last):
File "c:\Users\wanglei\AppData\Local\Programs\Python\Python312\Lib\runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\wanglei\AppData\Local\Programs\Python\Python312\Lib\runpy.py", line 88, in run_code
exec(code, run_globals)
File "c:\Users\wanglei.vscode\extensions\ms-python.debugpy-2024.12.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher/../..\debugpy_main.py", line 71, in
cli.main()
File "c:\Users\wanglei.vscode\extensions\ms-python.debugpy-2024.12.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 501, in main
run()
File "c:\Users\wanglei.vscode\extensions\ms-python.debugpy-2024.12.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher/../..\debugpy/..\debugpy\server\cli.py", line 351, in run_file
runpy.run_path(target, run_name="main")
File "c:\Users\wanglei.vscode\extensions\ms-python.debugpy-2024.12.0-win32-x64\bundled\libs\debugpy_vendored\pydevd_pydevd_bundle\pydevd_runpy.py", line 310, in run_path
return _run_module_code(code, init_globals, run_name, pkg_name=pkg_name, script_name=fname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\wanglei.vscode\extensions\ms-python.debugpy-2024.12.0-win32-x64\bundled\libs\debugpy_vendored\pydevd_pydevd_bundle\pydevd_runpy.py", line 127, in _run_module_code
_run_code(code, mod_globals, init_globals, mod_name, mod_spec, pkg_name, script_name)
File "c:\Users\wanglei.vscode\extensions\ms-python.debugpy-2024.12.0-win32-x64\bundled\libs\debugpy_vendored\pydevd_pydevd_bundle\pydevd_runpy.py", line 118, in _run_code
exec(code, run_globals)
File "E:\tiny\docker-drag\t.py", line 11, in
print(123)
^^^^^
File "", line 69, in cfunc.to_py.__Pyx_CFunc_7f6725__29_pydevd_sys_monitoring_cython_object__lParen__etc_to_py_4code_11from_offset_9to_offset.wrap
File "_pydevd_sys_monitoring\_pydevd_sys_monitoring_cython.pyx", line 1367, in _pydevd_sys_monitoring_cython._jump_event
TypeError: an integer is required
Rich Chiodo (@rchiodo) Any update on this issue? I'm running a project on ROS2 Jazzy with python 3.12 and I experience this issue when reaching breakpoints in vscode.
This release (2024.12.0) seems to have improvements in the execution time for the async part, but does not allow to debug using breakpoints on async calls. It is important to note that I don't experience any issue with this release when I don't use break points.
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 308, in spin self.spin_once() File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 899, in spin_once self._spin_once_impl(timeout_sec) File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 878, in _spin_once_impl handler, entity, node = self.wait_for_ready_callbacks( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 774, in wait_for_ready_callbacks if self._cb_iter is None or self._last_args != args or self._last_kwargs != kwargs: ^^^^ File "<stringsource>", line 69, in cfunc.to_py.__Pyx_CFunc_7f6725__29_pydevd_sys_monitoring_cython_object__lParen__etc_to_py_4code_11from_offset_9to_offset.wrap File "_pydevd_sys_monitoring\\_pydevd_sys_monitoring_cython.pyx", line 1367, in _pydevd_sys_monitoring_cython._jump_event TypeError: an integer is required
All previous versions don't have this issue, but they have issues with the executing time required to perform complex nested async calls.
Activity
xidianzhangjun commentedon Oct 18, 2024
Me too.
rchiodo commentedon Oct 21, 2024
Very weird. That code is here:
debugpy/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pyx
Line 1367 in 39879bd
I don't see how from_offset can not be an integer. Sys.monitoring says it's supposed to be an integer.
https://docs.python.org/3/library/sys.monitoring.html#monitoring-event-JUMP
rchiodo commentedon Oct 21, 2024
Does anybody have an example application that reproduces the problem?
scottnealon-aerocorp commentedon Oct 21, 2024
Seems related to this issue: fabioz/PyDev.Debugger#280
dimas-adi-kris commentedon Oct 22, 2024
In my case, I'm making an odoo module, using vscode debugger, put breakpoint, trigger it. After some debugging, this error sometimes shows several seconds I pause, sometimes right after I unpause the debug
Version: 1.94.2
Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427
Date: 2024-10-09T16:08:44.566Z
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Linux x64 6.8.0-47-generic
Python : 3.12.7
Python Debugger : 2024.12.0
Odoo : 16.0
Maybe trying to make odoo module is overkill to reproduce this problem. But I'm trying to help
jdwestwood commentedon Oct 22, 2024
Version: 1.94.2 (user setup)
Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427
Date: 2024-10-09T16:08:44.566Z
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045
Running in Win10/WSL2 with Python 3.12.
VSCode Python Debugger 2024.12.0
I encountered the
TypeError: an integer is requiredexception in my project. Based on the original code where I first found it, I was able to simplify the code triggering the exception down to:Here is the traceback.
Traceback (most recent call last): File "/usr/local/lib/python3.12/runpy.py", line 198, in _run_module_as_main return _run_code(code, main_globals, None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/runpy.py", line 88, in _run_code
exec(code, run_globals)
File "/home/john/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/main.py", line 71, in
cli.main()
File "/home/john/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 501, in main
run()
File "/home/john/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 351, in run_file
runpy.run_path(target, run_name="main")
File "/home/john/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 310, in run_path
return _run_module_code(code, init_globals, run_name, pkg_name=pkg_name, script_name=fname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/john/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 127, in _run_module_code
_run_code(code, mod_globals, init_globals, mod_name, mod_spec, pkg_name, script_name)
File "/home/john/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 118, in _run_code
exec(code, run_globals)
File "/home/john/vsc_projects/hello/VSCode debug bug 2024_10_22.py", line 12, in
b = 2
^
File "", line 69, in cfunc.to_py.__Pyx_CFunc_7f6725__29_pydevd_sys_monitoring_cython_object__lParen__etc_to_py_4code_11from_offset_9to_offset.wrap
File "_pydevd_sys_monitoring\_pydevd_sys_monitoring_cython.pyx", line 1367, in _pydevd_sys_monitoring_cython._jump_event
TypeError: an integer is required
Hope this helps.
vegetablest commentedon Oct 23, 2024
Rich Chiodo (@rchiodo) Sorry for not replying in time. The example provided by John Westwood (@jdwestwood) can reproduce this error stably.
dejavuwl commentedon Oct 24, 2024
similar code
t.pyhere.Version: 1.94.2 (user setup)
Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427
Date: 2024-10-09T16:08:44.566Z
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631
traceback
rchiodo commentedon Nov 8, 2024
The newest release on PyPi has the fix for this: v1.8.8.
It should ship relatively soon in the debugger extension for VS code.
jduval2022 commentedon Nov 21, 2024
Rich Chiodo (@rchiodo) Any update on this issue? I'm running a project on ROS2 Jazzy with python 3.12 and I experience this issue when reaching breakpoints in vscode.
This release (2024.12.0) seems to have improvements in the execution time for the async part, but does not allow to debug using breakpoints on async calls. It is important to note that I don't experience any issue with this release when I don't use break points.
File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 308, in spin self.spin_once() File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 899, in spin_once self._spin_once_impl(timeout_sec) File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 878, in _spin_once_impl handler, entity, node = self.wait_for_ready_callbacks( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ros/jazzy/lib/python3.12/site-packages/rclpy/executors.py", line 774, in wait_for_ready_callbacks if self._cb_iter is None or self._last_args != args or self._last_kwargs != kwargs: ^^^^ File "<stringsource>", line 69, in cfunc.to_py.__Pyx_CFunc_7f6725__29_pydevd_sys_monitoring_cython_object__lParen__etc_to_py_4code_11from_offset_9to_offset.wrap File "_pydevd_sys_monitoring\\_pydevd_sys_monitoring_cython.pyx", line 1367, in _pydevd_sys_monitoring_cython._jump_event TypeError: an integer is requiredAll previous versions don't have this issue, but they have issues with the executing time required to perform complex nested async calls.
rchiodo commentedon Nov 21, 2024
You're using an older release. This was fixed in 1.8.8. That is shipping in one of the prerelease versions of the debugger extension.
jduval2022 commentedon Nov 21, 2024
You are totally right! I switched to 2024.13.2024111901, and so far, it seems to have fixed my issue.
sonce commentedon Nov 27, 2024
same issue
if debug code will throw error "an integer is required"
but in run mode,it run well.
jduval2022 commentedon Nov 27, 2024
What version are you using? For me, switching to the newest release fixed the issue
davetapley commentedon Nov 27, 2024
Confused me at first, but I was able to resolve by:
pip install debugpy==1.8.8, and:fix(deps): update backend dependencies (patch) (patch)
Merge branch 'renovate/patch-backend-dependencies' into 'main'