Exception ignored in: <bound method PhotoImage.del of <tkinter.PhotoImage object at 0x0000000014FCFB70>>
Traceback (most recent call last):
File “C:\Python34\lib\tkinter_init_.py”, line 3383, in del
self.tk.call(‘image’, ‘delete’, self.name)
RuntimeError: main thread is not in main loop
Exception ignored in: <bound method PhotoImage.del of <tkinter.PhotoImage object at 0x0000000015251A58>>
Traceback (most recent call last):
File “C:\Python34\lib\tkinter_init_.py”, line 3383, in del
self.tk.call(‘image’, ‘delete’, self.name)
RuntimeError: main thread is not in main loop
Exception ignored in: <bound method PhotoImage.del of <tkinter.PhotoImage object at 0x000000001556E940>>
Traceback (most recent call last):
File “C:\Python34\lib\tkinter_init_.py”, line 3383, in del
self.tk.call(‘image’, ‘delete’, self.name)
RuntimeError: main thread is not in main loop
Tcl_AsyncDelete: async handler deleted by the wrong thread
解决:
将import matplotlib.pyplot as plt改为: import matplotlib matplotlib.use(‘Agg’) from matplotlib import pyplot as plt 即可