Closed russellxie closed 2 years ago
Found the answer in the other issue. I guess the package is only compatible with matplotlib 3.5 for now.
This is addressed in #309 -- haven't fixed dependency issues yet, but now installing proplot from scratch will at least enforce a compatible matplotlib version.
Description
I was just trying to import the package an seeing the following error message. Using Matplotlib 3.6.0 and Python 3.9. It seems that the package is looking for a attribute in
matplotlib.cm
that does not exist.Steps to reproduce
Expected behavior: [What you expected to happen]
Actual behavior:
File ~/.conda/envs/py39_pydsdb/lib/python3.9/site-packages/proplot/init.py:36 34 from .utils import # noqa: F401 F403 35 with _benchmark('colors'): ---> 36 from .colors import # noqa: F401 F403 37 with _benchmark('ticker'): 38 from .ticker import * # noqa: F401 F403
File ~/.conda/envs/py39_pydsdb/lib/python3.9/site-packages/proplot/colors.py:3111 3107 dict.setitem(self, key, value) 3110 # Initialize databases -> 3111 _cmap_database = _init_cmap_database() 3112 _color_database = _init_color_database() 3114 # Deprecated
File ~/.conda/envs/py39_pydsdb/lib/python3.9/site-packages/proplot/colors.py:2719, in _init_cmap_database() 2716 # WARNING: Skip over the matplotlib native duplicate entries 2717 # with suffixes '_r' and '_shifted'. 2718 attr = '_cmap_registry' if hasattr(mcm, '_cmap_registry') else 'cmap_d' -> 2719 database = getattr(mcm, attr) 2720 if mcm.get_cmap is not _get_cmap: 2721 mcm.get_cmap = _get_cmap
File ~/.conda/envs/py39_pydsdb/lib/python3.9/site-packages/matplotlib/_api/init.py:224, in caching_module_getattr..getattr(name)
222 if name in props:
223 return props[name].get(instance)
--> 224 raise AttributeError(
225 f"module {cls.module!r} has no attribute {name!r}")
AttributeError: module 'matplotlib.cm' has no attribute 'cmap_d'