Closed lparolari closed 5 months ago
I'm reporting a bug encountered during the usage of vot toolkit.
pip install vot-toolkit
vot initialize vot2022 --workspace workspace
It raises the following error
cannot import name 'get_cmap' from 'matplotlib.cm'
I'm using python 3.10.
The get_cmap function is used here: https://github.com/votchallenge/toolkit/blob/0abc8e537ca8c94bf898abae0217529daa272e7d/vot/report/__init__.py#L305
get_cmap
I did some digging on the internet and I found it is a recent change introduced by matplotlib in version3.9. Here I report the 3.9 changelog that removed get_cmap function: https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.9.0.html#top-level-cmap-registration-and-access-functions-in-mpl-cm
Other projects are having the same issue:
use matplotlib.colormaps[name] instead if you have a str. Use matplotlib.cm.ColormapRegistry.get_cmap if you have a str, None or a matplotlib.colors.Colormap object that you want to convert to a Colormap object.
I am willing to investigate more on the problem and possibly fix the code. Guidance might help.
Thank you
I have committed to fixing this issue in the development branch.
I'm reporting a bug encountered during the usage of vot toolkit.
To reproduce
pip install vot-toolkit
)vot initialize vot2022 --workspace workspace
It raises the following error
I'm using python 3.10.
About the error
The
get_cmap
function is used here: https://github.com/votchallenge/toolkit/blob/0abc8e537ca8c94bf898abae0217529daa272e7d/vot/report/__init__.py#L305I did some digging on the internet and I found it is a recent change introduced by matplotlib in version3.9. Here I report the 3.9 changelog that removed
get_cmap
function: https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.9.0.html#top-level-cmap-registration-and-access-functions-in-mpl-cmOther projects are having the same issue:
Possible solutions
I am willing to investigate more on the problem and possibly fix the code. Guidance might help.
Thank you