You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the prediction: python start_prediction.py *PathToConfigFile*
I get an error ar line 133 in summary.py:
Traceback (most recent call last):
File "/Users/lionel/Lionoil/Research/2208_whitefly/ANIMAL-SPOT-master/ANIMAL-SPOT/predict.py", line 348, in <module>
plot_spectrogram(spectrogram=input.cpu().squeeze(dim=0).squeeze(dim=0), title="Spectrogram",
File "/Users/lionel/Lionoil/Research/2208_whitefly/ANIMAL-SPOT-master/ANIMAL-SPOT/utils/summary.py", line 133, in plot_spectrogram
kwargs.setdefault("cmap", plt.cm.get_cmap("viridis"))
^^^^^^^^^^^^^^^
AttributeError: module 'matplotlib.cm' has no attribute 'get_cmap'
matplotlib.cm.get_cmap(name) has been removed from matplotlib.cm. Instead, you can use matplotlib.colormaps[name] or matplotlib.colormaps.get_cmap(name)
I solved the issue by changing line 133 in summary.py: kwargs.setdefault("cmap", plt.cm.get_cmap("viridis"))
to kwargs.setdefault("cmap", plt.colormaps.get_cmap("viridis"))
Tested on macOS 10.15 / python3
The text was updated successfully, but these errors were encountered:
When running the prediction:
python start_prediction.py *PathToConfigFile*
I get an error ar line 133 in summary.py:
matplotlib.cm.get_cmap(name)
has been removed frommatplotlib.cm
. Instead, you can usematplotlib.colormaps[name]
ormatplotlib.colormaps.get_cmap(name)
I solved the issue by changing line 133 in summary.py:
kwargs.setdefault("cmap", plt.cm.get_cmap("viridis"))
to
kwargs.setdefault("cmap", plt.colormaps.get_cmap("viridis"))
Tested on macOS 10.15 / python3
The text was updated successfully, but these errors were encountered: