Skip to content

ImageTk int overflow error #1902

@vlachoudis

Description

@vlachoudis

I am running on a 32bit Fedora-23 virtual machine via virtualbox, version 3.0.0-4
When I try to convert an image to tkimage I get an overflow error
since the tk.interpaddr() returns a 64bit address which cannot be converted to int.

The same code in 64bit Fedora-23 save version works ok.

File "/usr/local/flair/lib/ZoomImage.py", line 162, in zoomImage
    self.tkimage = ImageTk.PhotoImage(self.photo)
  File "/usr/lib/python2.7/site-packages/PIL/ImageTk.py", line 115, in __init__
    self.paste(image)
  File "/usr/lib/python2.7/site-packages/PIL/ImageTk.py", line 182, in paste
    _imagingtk.tkinit(tk.interpaddr(), 1)
OverflowError: Python int too large to convert to C long
>>> from Tkinter import *
>>> tk=Tk()
>>> tk.interpaddr()
2161299816L

Metadata

Metadata

Assignees

Labels

BugAny unexpected behavior, until confirmed feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions