Consider the following simple python code:
import matplotlib.pyplot as mplot
mplot.plot([1,2,3,4],[1,2,3,4])
This script has no problems when the script runs, however if I close the python console (by clicking the red x), I get the following error:
Fatal Python error: PyEval_RrestoreThread: NULL tstate
This problem does not occur if I use ctrl+Z to exit the python console. It seems to me that there is some hanging process that isn't terminated properly if I exist the first way. I've attempted adding
mplot.close('all')
to the end of the script, but I get the following resulting error:
can't invoke "event" command: application has been destroyed while executing
"event generate $w <<ThemeChanged>>"
(procedure "ttk::ThemeChanged" line 6)
invoke from within
"ttk::ThemeChanged"
I am running Python 3.3 x86. Could anyone help me understand this issue?
Thanks!