wdecoster/nanopack

nanoplot from nanopack failed

Dramenia opened this issue · 11 comments

yesterday i downloaded the latest version by PIP, and i rerun nanoplot on a fastq file from albacore (using --fastq_rich), but i get the following error:

Traceback (most recent call last):
File "/home/chris/anaconda3/bin/NanoPlot", line 11, in
sys.exit(main())
File "/home/chris/anaconda3/lib/python3.6/site-packages/nanoplot/NanoPlot.py", line 70, in main
plots = make_plots(datadf, settings, args)
File "/home/chris/anaconda3/lib/python3.6/site-packages/nanoplot/NanoPlot.py", line 328, in make_plots
figformat=args.format)
File "/home/chris/anaconda3/lib/python3.6/site-packages/nanoplotter/nanoplotter.py", line 257, in time_plots
dpi=100)
File "/home/chris/anaconda3/lib/python3.6/site-packages/seaborn/axisgrid.py", line 1854, in savefig
self.fig.savefig(*args, **kwargs)
File "/home/chris/anaconda3/lib/python3.6/site-packages/matplotlib/figure.py", line 1573, in savefig
self.canvas.print_figure(*args, **kwargs)
TypeError: print_figure() missing 1 required positional argument: 'filename'

am i missing something here? it did work before when i had an older version of nanoplot alone.

Hi Dramenia,

Thanks for reporting this - that shouldn't happen!
Can you tell me the versions of NanoPlot and nanoplotter you are using?

For that you can use these commands:

python -c "import nanoplot ; print(nanoplot.__version__)"
python -c "import nanoplotter ; print(nanoplotter.__version__)"

Cheers,
Wouter

python3 -c "import nanoplot ; print(nanoplot.version)" -> 1.2.2
python3 -c "import nanoplotter ; print(nanoplotter.version)" -> 0.24.1

i can install nanoplot only, but i need a stable overall system that i can share with my colleagues, and the additional things that nanopack is capable are just to good to not include into out nanopore analysing pipelines

Thanks for the nice words!

I can't replicate your issue on my system, could you check the version of matplotlib and try updating it if it's <2.1.0?

python -c "import matplotlib ; print(matplotlib.__version__)"

If necessary:

pip install matplotlib -U

2.0.2
The funny thing is, that i used nanoplot on the same dataset before installing the nanopack (the nanoplot had a typo in the X axis label) and it worked great then.

I suspect you installed a newer version of nanoplotter with installing NanoPack. Does updating matplotlib make a difference? Just trying to nail this down...

no, this does not help. do you know if all parts of nanoplot uses python3 (#/usr/bin/python3) on the top? is there a way for me to adjust the scripts that we can check the python version (i have python3 and 2.7 installed, this might give it some problems)

NanoPlot doesn't run on Python2.7, so you would notice errors earlier. But the log file will tell you which Python version is used, so you can check that. Which version of seaborn do you have installed?

I can't replicate your issue, and also building and testing on Travis CI does is successful for Python 3.4, 3.5 and 3.6. (https://travis-ci.org/wdecoster/NanoPlot). That makes it hard to troubleshoot for me what's wrong...

mmm could the issue be related to conda? i am trying to uninstall all, and try to reinstall it again, but i am unable to totally uninstall it. when i did pip uninstall nanoplot, i could still use the nanoplot in the terminal, even after reloading the terminal.
In conda list, i could see all the parts from nanopack, even when it seems that i uninstalled it.
so i uninstalled everything seperatly that was showing up on conda list, and reinstalled nanopack using your command. but still getting the same error. i will install it on a different computer just to test out if it is correlated with my previously installed nanoplot.
will get back to you when i understand the error better or know more

It's not impossible that you have these issues due to multiple versions installed, I guess. Note that you probably can't uninstall things with pip if you installed them with conda first...

Let's hope testing on another computer will learn us more about this.

solved: i removed everything with pip by checking the conda list. then i reinstalled it with pip install nanopack, but this still resulted in the same error. then i did pip install nanopack --upgrade, and that seems to work. it updated a few additional modules, and that seems to have solved the problem. so could you add to the install manual that all previous versions of nanoplot should be removed before using the pip install nanopack command?

Thanks for the feedback!