Opened 17 years ago
Closed 15 years ago
#235 closed defect (fixed)
validate okushiri causes PyEval_RestoreThread: NULL tstate on Windows
Reported by: | ole | Owned by: | ole |
---|---|---|---|
Priority: | lowest | Milestone: | |
Component: | Testing and validation | Version: | |
Severity: | normal | Keywords: | |
Cc: |
Description
The validation result is fine, but the error probably has to do with Matplotlib and Windows. Here's a posting that may help http://www.thescripts.com/forum/thread33569.html
"Noe" == Noe <noe@…> writes:
Noe> thanks for your answer, but I already have a problem while Noe> launching the script :
Noe> Fatal Python error: PyEval_RestoreThread: NULL tstate Noe> abnormal program termination
This kind of error is almost always caused by an incompatibility in the GUI environment you are using and the backend you have chosen. The default backend is set in the configuration file - see http://matplotlib.sf.net/.matplotlibrc. See also http://matplotlib.sourceforge.net/faq.html#FREEZE and http://matplotlib.sourceforge.net/backends.html for general information on this problem.
If you are running matplotlib from an IDE such as IDLE and you want to use the tkagg backend (a typical configuration for win32 users), it is recommended that you launch idle with -n. Unfortunately, there was an error in matplotlib/backends/backend_tkagg.py in the 'show' function in the 0.60.2 release. If this indeed is your configuration, try editing this file and commenting out the line
Tk.mainloop()
in the show function and relaunching idle with -n.
The safest way to test/play/experiment with matplotlib is to launch your script from the command shell, choosing the backend with the -d flag, as in
C:> python myscript.py -dTkAgg
as described on http://matplotlib.sourceforge.net/backends.html. Once you have matplotlib configured to your satisfaction from the shell, you can refine your backend and IDE choice following the guidelines in the links above.
Hope this helps, John Hunter
Change History (2)
comment:1 Changed 17 years ago by ole
comment:2 Changed 15 years ago by nariman
- Resolution set to fixed
- Status changed from new to closed
Workaround implemented in changeset:5183 Keep ticket open though, as it would be good to have png files generated by the automatic testing suite - even on windows machines.