wdecoster / NanoPlot

Plotting scripts for long read sequencing data
http://nanoplot.bioinf.be
MIT License
419 stars 47 forks source link

module 'matplotlib.cm' has no attribute 'cmap_d' #333

Closed Ghahfarokhi closed 1 year ago

Ghahfarokhi commented 1 year ago

Hi,

Please can you help me with solving the following error? Here is the traceback (I am running NanoPlot from within a conda environment, installed using conda, NanoPlot version: 1.30.1):

Traceback (most recent call last): File "/Users/amir/Assembly_ONT/.snakemake/conda/4662e0a5ca323c0a576ce5c7b9180b4e/bin/NanoPlot", line 10, in sys.exit(main()) File "/Users/amir/Assembly_ONT/.snakemake/conda/4662e0a5ca323c0a576ce5c7b9180b4e/lib/python3.10/site-packages/nanoplot/NanoPlot.py", line 97, in main plots = make_plots(datadf, settings) File "/Users/amir/Assembly_ONT/.snakemake/conda/4662e0a5ca323c0a576ce5c7b9180b4e/lib/python3.10/site-packages/nanoplot/NanoPlot.py", line 134, in make_plots colormap = nanoplotter.check_valid_colormap(settings["colormap"]) File "/Users/amir/Assembly_ONT/.snakemake/conda/4662e0a5ca323c0a576ce5c7b9180b4e/lib/python3.10/site-packages/nanoplotter/nanoplotter_main.py", line 65, in check_valid_colormap if colormap in list(cm.cmap_d.keys()): AttributeError: module 'matplotlib.cm' has no attribute 'cmap_d'

wdecoster commented 1 year ago

Hi,

Can you tell me the matplotlib version you have? NanoPlot is currently at v1.41.3, so you could also consider upgrading.

Wouter

LHsoerensen commented 1 year ago

Hey,

i am encountering the same issue, My matplotlib version should be 3.7.1 I just installed Nanoplot using:

pip install -t /path/i/want NanoPlot But when running the tool, the version is still displayed as v1.41.0, even when i upgrade an the message shows 1.41.6 was successfully installed.

Any ideas for a work around ? best, Lauge

wdecoster commented 1 year ago

You probably have multiple installations of NanoPlot. You can try which NanoPlot to see where it is.

LHsoerensen commented 1 year ago

Hey and thanks for the quick reply, the issue was solved by adding the nanoplot folder to my python path

export PYTHONPATH="/my/nanoplot/path"

best