mcuntz / ncvue

A minimal GUI for a quick view of netcdf files. Aiming to be a drop-in replacement for ncview.
https://mcuntz.github.io/ncvue/
Other
68 stars 5 forks source link

AttributeError: module 'matplotlib.cm' has no attribute 'get_cmap' #8

Closed melodicdeath closed 4 months ago

melodicdeath commented 4 months ago

Hi,I seem to have found a bug in 4.4.1, which may be related to the version of matplotlib. I roll back the version from matplotlib-3.9.0 to matplotlib-3.8.4 and it will work normally.

Exception in Tkinter callback Traceback (most recent call last): File "/home/micromamba/envs/ncvue/lib/python3.9/tkinter/init.py", line 1892, in call return self.func(*args) File "/home/micromamba/envs/ncvue/lib/python3.9/site-packages/ncvue/ncvmap.py", line 797, in selected_v self.redraw() File "/home/micromamba/envs/ncvue/lib/python3.9/site-packages/ncvue/ncvmap.py", line 1290, in redraw self.ncmap = mpl.cm.get_cmap(self.icmap).N AttributeError: module 'matplotlib.cm' has no attribute 'get_cmap'

mcuntz commented 4 months ago

Sorry for the late reply. I was on holiday :-)

Thanks for the bug report. I corrected it and bumped to v4.4.2 on PyPI and conda-forge. Strange that matplotlib did not throw a deprecation warning with versions 3.8.x.