当前位置: 首页 > 工具软件 > Photo Stack > 使用案例 >

python中的out of loop_TclError: out of stack space (infinite loop?)

时宾实
2023-12-01

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

>>> f= media.choose_file()

>>> pic= media.load_picture(f)

>>> media.show(pic)

Exception AttributeError: "PhotoImage instance has no attribute '_PhotoImage__photo'" in > ignored

Traceback (most recent call last):

File "", line 1, in

media.show(pic)

File "C:\Python27\lib\site-packages\pygraphics\media.py", line 76, in show

pic.show()

File "C:\Python27\lib\site-packages\pygraphics\picture.py", line 168, in show

self._draw_image_to_win(self.win)

File "C:\Python27\lib\site-packages\pygraphics\picture.py", line 154, in _draw_image_to_win

ImageTk.PhotoImage(self.get_image()))

File "C:\Python27\lib\site-packages\PIL\ImageTk.py", line 113, in __init__

self.__photo = apply(Tkinter.PhotoImage, (), kw)

File "C:\Python27\lib\lib-tk\Tkinter.py", line 3244, in __init__

Image.__init__(self, 'photo', name, cnf, master, **kw)

File "C:\Python27\lib\lib-tk\Tkinter.py", line 3200, in __init__

self.tk.call(('image', 'create', imgtype, name,) + options)

TclError: out of stack space (infinite loop?)

这是怎么回事,怎么处理,求大神!!

 类似资料: