Menu

#727 OverflowError in the debugger

v1.0 (example)
closed-fixed
nobody
None
5
2018-01-04
2016-08-02
dbely
No

While trying to debug a program with pythonwin 220 I get OverflowError in the debugger:

`
PythonWin 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
Traceback (most recent call last):
File "C:\ProgramData\chocolatey\lib\python3\tools\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 321, in RunScript
debugger.run(codeObject, main.dict, start_stepping=1)
File "C:\ProgramData\chocolatey\lib\python3\tools\Lib\site-packages\Pythonwin\pywin\debugger__init__.py", line 60, in run
_GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
File "C:\ProgramData\chocolatey\lib\python3\tools\Lib\site-packages\Pythonwin\pywin\debugger\debugger.py", line 654, in run
exec(cmd, globals, locals)
File "C:\Work\opencv-py\read_tiff.py", line 1, in <module>
from PIL import Image
File "C:\Work\opencv-py\read_tiff.py", line 1, in <module>
from PIL import Image
File "C:\ProgramData\chocolatey\lib\python3\tools\lib\bdb.py", line 48, in trace_dispatch
return self.dispatch_line(frame)
File "C:\ProgramData\chocolatey\lib\python3\tools\lib\bdb.py", line 66, in dispatch_line
self.user_line(frame)
File "C:\ProgramData\chocolatey\lib\python3\tools\Lib\site-packages\Pythonwin\pywin\debugger\debugger.py", line 616, in user_line
debugger_parent.user_line(self, frame)
File "C:\ProgramData\chocolatey\lib\python3\tools\lib\pdb.py", line 259, in user_line
self.interaction(frame, None)
File "C:\ProgramData\chocolatey\lib\python3\tools\lib\pdb.py", line 346, in interaction
self._cmdloop()
File "C:\ProgramData\chocolatey\lib\python3\tools\lib\pdb.py", line 319, in _cmdloop
self.cmdloop()
File "C:\ProgramData\chocolatey\lib\python3\tools\Lib\site-packages\Pythonwin\pywin\debugger\debugger.py", line 575, in cmdloop
self.GUIAboutToBreak()
File "C:\ProgramData\chocolatey\lib\python3\tools\Lib\site-packages\Pythonwin\pywin\debugger\debugger.py", line 847, in GUIAboutToBreak
self.GUIAboutToInteract()
File "C:\ProgramData\chocolatey\lib\python3\tools\Lib\site-packages\Pythonwin\pywin\debugger\debugger.py", line 878, in GUIAboutToInteract
self.GUIRespondDebuggerData()
File "C:\ProgramData\chocolatey\lib\python3\tools\Lib\site-packages\Pythonwin\pywin\debugger\debugger.py", line 833, in GUIRespondDebuggerData
cb.RespondDebuggerData()
File "C:\ProgramData\chocolatey\lib\python3\tools\Lib\site-packages\Pythonwin\pywin\debugger\debugger.py", line 219, in RespondDebuggerData
if self.list.GetItemImage(handle)!= (col, selCol):
OverflowError: Python int too large to convert to C long

`

Discussion

  • bob gailer

    bob gailer - 2016-12-17

    This has been happening to me also. It stops my development effort. Can it be fixed soon?

     
  • markt

    markt - 2017-04-01

    Similar error debugging in 3.6.0 and 3.6.1 with -220 and -221. Just hit F10 to start the debugger and it happens on any script. I'm using Window 10 64-bit, and 64-bit versions of Python as well.

     

    Last edit: markt 2017-04-01
  • panda

    panda - 2017-09-28

    It seems GetItemImage(handle) in debugger stack window incorrectly expects a 32-bit long handle whereas it is 64-bit on x64. Last working pywin32 version is 219 but they don't have builds for python 3.6.
    So I just commented line 219 (interesting coincidence!) in debugger.py and shifted next line to the left:

    #if self.list.GetItemImage(handle)!= (col, selCol):
    self.list.SetItemImage(handle, col, selCol)
    

    SetItemImage doesn't have this bug so it works fine.

     
  • Mauro Cicognini

    Mauro Cicognini - 2017-10-28

    Thanks @panda, your workaround saved my day.

    Now, I just hope Mark Hammond will get around fixing this.

    Cheers,
    Mauro

     
  • Mark Hammond

    Mark Hammond - 2018-01-04
    • status: open --> closed-fixed