PIL/Tkinter problem on Solaris
loredo at spacenet.tn.cornell.edu
Thu Jun 24 00:33:52 CEST 1999
I've been using Python 1.5.2 on Solaris, and everything has been
going fine until I tried to use piddleTK and ImageTk. After installing
PIL and Piddle, running the piddleTK "sample1.py" file (with the
required .gif file on hand) gives this traceback:
Traceback (innermost last):
File "pd_test.py", line 62, in ?
File "pd_test.py", line 57, in test
File "pd_test.py", line 52, in sample1
canvas.drawImage( i, 5, 220)
File "/home/laplace/lib/python1.5/site-packages/piddle/piddleTK.py", line 320,
itk = ImageTk.PhotoImage(img)
File "/home/laplace/lib/python1.5/site-packages/PIL/ImageTk.py", line 83, in
File "/home/laplace/lib/python1.5/site-packages/PIL/ImageTk.py", line 113, in
self.__photo.tk.call("PyImagingPhoto", self.__photo, block.id)
TclError: invalid command name "PyImagingPhoto"
I understand that this is a reported bug for PIL, but I've followed
the instructions in the PIL README and 1.5.2 Setup files to make
sure the Tcl command "PyImagingPhoto" is registered, yet it doesn't
seem to have happened. By the way, this was done after a "make clean".
Any clues as to what else I should change?
Thanks in advance,
PS: I tried recompiling python both with the included tkappinit.c file,
and with one slightly modified. The one provided with 1.5.2 has this
line in the WITH_PIL section:
extern void TkImaging_Init(Tcl_Interp *);
but the PIL README says it should look like this:
extern void TkImaging_Init(Tcl_Interp* interp);
Both versions give the same error.
More information about the Python-list