Exception in script of module OMFIT['PCS']['_PCS_prad_control']:
Error in "OMFIT command box #1" at line 9
omas_plot.equilibrium_summary(ods,linewidth=1)
ImportError: cannot import name _cntr
Press <F6> to see full error report...
Traceback (most recent call last):
File "/home/eldond/OMFIT-source/omfit/OMFITx.py", line 3590, in manage_user_errors
tmp=command(**kw)
File "/home/eldond/OMFIT-source/omfit/utils_tk.py", line 835, in GlobLoc
return tmp.run(_relLoc=self.namespace, _OMFITscriptsDict=False, _OMFITconsoleDict=True, noGUI=None)
File "/home/eldond/OMFIT-source/omfit/omfit_tree.py", line 1277, in run
result = self.__run__(**kw)
File "/home/eldond/OMFIT-source/omfit/omfit_tree.py", line 1185, in __run__
tmp=execGlobLoc(self, kw, _relLoc, OMFITconsoleDict, {}, prerun=_prerun, postrun=_postrun)
File "/home/eldond/OMFIT-source/omfit/omfit_tree.py", line 127, in f_locked
return f(*args,**kw)
File "/home/eldond/OMFIT-source/omfit/omfit_tree.py", line 283, in execGlobLoc
exec(compile(exeString, filename, "exec"),GlobLoc)
File "/tmp/eldond/OMFIT/OMFIT_2018-05-31_15_40_36_986220/project/OMFIT command box #1", line 9, in <module>
omas_plot.equilibrium_summary(ods,linewidth=1)
File "/usr/lib/python2.7/site-packages/omas/omas_plot.py", line 287, in equilibrium_summary
ax = equilibrium_CX(ods, time_index=time_index, ax=ax, **kw)
File "/usr/lib/python2.7/site-packages/omas/omas_plot.py", line 227, in equilibrium_CX
levels, smooth_factor=1):
File "/usr/lib/python2.7/site-packages/omas/omas_plot.py", line 37, in contourPaths
from matplotlib import _cntr
ImportError: cannot import name _cntr
I was on matplotlib 2.2.2. I see that the OMFIT requirements.txt file lists 2.1.*, so I downgraded to 2.1.2 and it works. Probably OMAS should note a matplotlib version number somewhere.
While trying to work through
samples/omas_omfit.py
, I encountered anImportError
becauseomas/omas_plot.py
is using a deprecated module from an old version of matplotlib. There is no matplotlib version specified inrequirements.txt
. See https://github.com/flatironinstitute/CaImAn/issues/174.