Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'NoneType' object is not iterable #250

Closed
sunliang3361 opened this issue Apr 8, 2021 · 9 comments
Closed

'NoneType' object is not iterable #250

sunliang3361 opened this issue Apr 8, 2021 · 9 comments

Comments

@sunliang3361
Copy link

Hello,
do you know what my problem is ? Here is the log file below:

2021-04-08 14:53:19,547 NanoPlot 1.35.4 started with arguments Namespace(N50=False, alength=False, bam=None, barcoded=False, color='#4CB391', colormap='Greens', cram=None, downsample=None, dpi=100, drop_outliers=False, fasta=None, fastq=['FAO58567.fastq'], fastq_minimal=None, fastq_rich=None, feather=None, font_scale=1, hide_stats=False, huge=False, info_in_report=False, legacy=False, listcolormaps=False, listcolors=False, loglength=False, maxlength=40000, minlength=None, minqual=None, no_N50=False, no_supplementary=False, outdir='.', path='./', percentqual=False, pickle=None, plots=['hex', 'dot'], prefix='', raw=False, readtype='1D', runtime_until=None, store=False, summary=None, threads=8, title=None, tsv_stats=False, ubam=None, verbose=False)
2021-04-08 14:53:19,548 Python version is: 3.7.6 | packaged by conda-forge | (default, Mar 23 2020, 23:03:20) [GCC 7.3.0]
2021-04-08 14:53:19,571 Nanoget: Starting to collect statistics from plain fastq file.
2021-04-08 15:01:40,341 Reduced DataFrame memory usage from 51.81884765625Mb to 34.5458984375Mb
2021-04-08 15:01:40,590 Nanoget: Gathered all metrics of 2264000 reads
2021-04-08 15:01:42,595 Calculated statistics
2021-04-08 15:01:42,598 Using sequenced read lengths for plotting.
2021-04-08 15:01:43,015 Hidding 930 reads longer than 40000bp in length plots.
2021-04-08 15:01:43,200 NanoPlot: Valid color #4CB391.
2021-04-08 15:01:43,201 NanoPlot: Valid colormap Greens.
2021-04-08 15:01:43,588 NanoPlot: Creating length plots for Read length.
2021-04-08 15:01:43,615 NanoPlot: Using 2263070 reads maximum of 39994bp.
2021-04-08 15:01:43,981 No static plots are saved due to some kaleido problem:
2021-04-08 15:01:43,981
The kaleido executable is required by the kaleido Python library, but it was not included
in the Python package and it could not be found on the system PATH.

Searched for included kaleido executable at:
/programs/x86_64-linux/nanoplot/1.35.4/nanoplot_extlib/miniconda3-2019.07-sck6/lib/python3.7/site-packages/kaleido/executable/kaleido

Searched for executable 'kaleido' on the following system PATH:
/programs/x86_64-linux/nanoplot/1.35.4/bin
/programs/x86_64-linux/system/biogrids_bin
/opt/ohpc/pub/mpi/openmpi3-gnu8/3.1.4/bin
/opt/ohpc/pub/compiler/gcc/8.3.0/bin
/opt/ohpc/pub/utils/prun/1.3
/opt/ohpc/pub/utils/autotools/bin
/opt/ohpc/pub/bin
/usr/lib64/qt-3.3/bin
/usr/local/bin
/usr/bin
/usr/local/sbin
/usr/sbin
/home/ch213537/.local/bin
/home/ch213537/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
.

2021-04-08 15:01:44,284 No static plots are saved due to some kaleido problem:
2021-04-08 15:01:44,284
The kaleido executable is required by the kaleido Python library, but it was not included
in the Python package and it could not be found on the system PATH.

Searched for included kaleido executable at:
/programs/x86_64-linux/nanoplot/1.35.4/nanoplot_extlib/miniconda3-2019.07-sck6/lib/python3.7/site-packages/kaleido/executable/kaleido

Searched for executable 'kaleido' on the following system PATH:
/programs/x86_64-linux/nanoplot/1.35.4/bin
/programs/x86_64-linux/system/biogrids_bin
/opt/ohpc/pub/mpi/openmpi3-gnu8/3.1.4/bin
/opt/ohpc/pub/compiler/gcc/8.3.0/bin
/opt/ohpc/pub/utils/prun/1.3
/opt/ohpc/pub/utils/autotools/bin
/opt/ohpc/pub/bin
/usr/lib64/qt-3.3/bin
/usr/local/bin
/usr/bin
/usr/local/sbin
/usr/sbin
/home/ch213537/.local/bin
/home/ch213537/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
.

2021-04-08 15:01:44,352 No static plots are saved due to some kaleido problem:
2021-04-08 15:01:44,352
The kaleido executable is required by the kaleido Python library, but it was not included
in the Python package and it could not be found on the system PATH.

Searched for included kaleido executable at:
/programs/x86_64-linux/nanoplot/1.35.4/nanoplot_extlib/miniconda3-2019.07-sck6/lib/python3.7/site-packages/kaleido/executable/kaleido

Searched for executable 'kaleido' on the following system PATH:
/programs/x86_64-linux/nanoplot/1.35.4/bin
/programs/x86_64-linux/system/biogrids_bin
/opt/ohpc/pub/mpi/openmpi3-gnu8/3.1.4/bin
/opt/ohpc/pub/compiler/gcc/8.3.0/bin
/opt/ohpc/pub/utils/prun/1.3
/opt/ohpc/pub/utils/autotools/bin
/opt/ohpc/pub/bin
/usr/lib64/qt-3.3/bin
/usr/local/bin
/usr/bin
/usr/local/sbin
/usr/sbin
/home/ch213537/.local/bin
/home/ch213537/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
.

2021-04-08 15:01:44,531 No static plots are saved due to some kaleido problem:
2021-04-08 15:01:44,531
The kaleido executable is required by the kaleido Python library, but it was not included
in the Python package and it could not be found on the system PATH.

Searched for included kaleido executable at:
/programs/x86_64-linux/nanoplot/1.35.4/nanoplot_extlib/miniconda3-2019.07-sck6/lib/python3.7/site-packages/kaleido/executable/kaleido

Searched for executable 'kaleido' on the following system PATH:
/programs/x86_64-linux/nanoplot/1.35.4/bin
/programs/x86_64-linux/system/biogrids_bin
/opt/ohpc/pub/mpi/openmpi3-gnu8/3.1.4/bin
/opt/ohpc/pub/compiler/gcc/8.3.0/bin
/opt/ohpc/pub/utils/prun/1.3
/opt/ohpc/pub/utils/autotools/bin
/opt/ohpc/pub/bin
/usr/lib64/qt-3.3/bin
/usr/local/bin
/usr/bin
/usr/local/sbin
/usr/sbin
/home/ch213537/.local/bin
/home/ch213537/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
.

2021-04-08 15:01:46,527 No static plots are saved due to some kaleido problem:
2021-04-08 15:01:46,527
The kaleido executable is required by the kaleido Python library, but it was not included
in the Python package and it could not be found on the system PATH.

Searched for included kaleido executable at:
/programs/x86_64-linux/nanoplot/1.35.4/nanoplot_extlib/miniconda3-2019.07-sck6/lib/python3.7/site-packages/kaleido/executable/kaleido

Searched for executable 'kaleido' on the following system PATH:
/programs/x86_64-linux/nanoplot/1.35.4/bin
/programs/x86_64-linux/system/biogrids_bin
/opt/ohpc/pub/mpi/openmpi3-gnu8/3.1.4/bin
/opt/ohpc/pub/compiler/gcc/8.3.0/bin
/opt/ohpc/pub/utils/prun/1.3
/opt/ohpc/pub/utils/autotools/bin
/opt/ohpc/pub/bin
/usr/lib64/qt-3.3/bin
/usr/local/bin
/usr/bin
/usr/local/sbin
/usr/sbin
/home/ch213537/.local/bin
/home/ch213537/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
.

2021-04-08 15:01:46,527 Created length plots
2021-04-08 15:01:46,697 NanoPlot: Creating Read lengths vs Average read quality plots using statistics from 2263070 reads.
2021-04-08 15:01:47,504 No static plots are saved due to some kaleido problem:
2021-04-08 15:01:47,504
The kaleido executable is required by the kaleido Python library, but it was not included
in the Python package and it could not be found on the system PATH.

Searched for included kaleido executable at:
/programs/x86_64-linux/nanoplot/1.35.4/nanoplot_extlib/miniconda3-2019.07-sck6/lib/python3.7/site-packages/kaleido/executable/kaleido

Searched for executable 'kaleido' on the following system PATH:
/programs/x86_64-linux/nanoplot/1.35.4/bin
/programs/x86_64-linux/system/biogrids_bin
/opt/ohpc/pub/mpi/openmpi3-gnu8/3.1.4/bin
/opt/ohpc/pub/compiler/gcc/8.3.0/bin
/opt/ohpc/pub/utils/prun/1.3
/opt/ohpc/pub/utils/autotools/bin
/opt/ohpc/pub/bin
/usr/lib64/qt-3.3/bin
/usr/local/bin
/usr/bin
/usr/local/sbin
/usr/sbin
/home/ch213537/.local/bin
/home/ch213537/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
.

2021-04-08 15:01:47,504 'NoneType' object is not iterable
Traceback (most recent call last):
File "/programs/x86_64-linux/nanoplot/1.35.4/nanoplot_extlib/miniconda3-2019.07-sck6/lib/python3.7/site-packages/nanoplot/NanoPlot.py", line 105, in main
plots = make_plots(datadf, settings)
File "/programs/x86_64-linux/nanoplot/1.35.4/nanoplot_extlib/miniconda3-2019.07-sck6/lib/python3.7/site-packages/nanoplot/NanoPlot.py", line 174, in make_plots
title=settings["title"])
TypeError: 'NoneType' object is not iterable

@wdecoster
Copy link
Owner

Thanks for reporting this. It is not immediately obvious to me what causes this error, but we will investigate.

@iliasbukraa
Copy link
Contributor

@sunliang3361 a couple of questions to resolve this issue: what operating system are you using to run NanoPlot? Could you provide us with the running version of the kaleido package (pip show kaleido should do the trick). And lastly, what package manager did you use to install NanoPlot (conda/pip). Thanks!

@sunliang3361
Copy link
Author

@iliasbukraa @wdecoster

  1. We used CentOS Linux release 7.9.2009

2: $ ./python
Python 3.7.6 | packaged by conda-forge | (default, Mar 23 2020, 23:03:20)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
im>>> import kaleido

print(kaleido.version)
0.1.0

3: nanoplot installed by conda: nanoplot 1.35.4 pyhdfd78af_0 bioconda

@iliasbukraa
Copy link
Contributor

If I could suggest an update of the kaleido package, there have been issues with the 0.1.0 release. Could you rerun NanoPlot and see if the issues persists?

@sunliang3361
Copy link
Author

Thank you. I have updated Kaleido package, there is no kaleido problem now but still 'NoneType' error.

2021-04-09 11:45:14,774 NanoPlot 1.35.4 started with arguments Namespace(N50=False, alength=False, bam=None, barcoded=False, color='#4CB391', colormap='Greens', cram=None, downsample=None, dpi=100, drop_outliers=False, fasta=None, fastq=['FAO58567.fastq'], fastq_minimal=None, fastq_rich=None, feather=None, font_scale=1, hide_stats=False, huge=False, info_in_report=False, legacy=False, listcolormaps=False, listcolors=False, loglength=False, maxlength=40000, minlength=None, minqual=None, no_N50=False, no_supplementary=False, outdir='.', path='./', percentqual=False, pickle=None, plots=['hex', 'dot'], prefix='', raw=False, readtype='1D', runtime_until=None, store=False, summary=None, threads=8, title='Nanopore_Eliot', tsv_stats=False, ubam=None, verbose=False)
2021-04-09 11:45:14,774 Python version is: 3.7.6 | packaged by conda-forge | (default, Mar 23 2020, 23:03:20) [GCC 7.3.0]
2021-04-09 11:45:14,794 Nanoget: Starting to collect statistics from plain fastq file.
2021-04-09 11:54:38,826 Reduced DataFrame memory usage from 51.81884765625Mb to 34.5458984375Mb
2021-04-09 11:54:39,012 Nanoget: Gathered all metrics of 2264000 reads
2021-04-09 11:54:40,771 Calculated statistics
2021-04-09 11:54:40,773 Using sequenced read lengths for plotting.
2021-04-09 11:54:41,109 Hidding 930 reads longer than 40000bp in length plots.
2021-04-09 11:54:41,226 NanoPlot: Valid color #4CB391.
2021-04-09 11:54:41,227 NanoPlot: Valid colormap Greens.
2021-04-09 11:54:41,430 NanoPlot: Creating length plots for Read length.
2021-04-09 11:54:41,446 NanoPlot: Using 2263070 reads maximum of 39994bp.
2021-04-09 11:54:53,930 Created length plots
2021-04-09 11:54:54,134 NanoPlot: Creating Read lengths vs Average read quality plots using statistics from 2263070 reads.
2021-04-09 11:54:57,089 'NoneType' object is not iterable
Traceback (most recent call last):
File "/programs/x86_64-linux/nanoplot/1.35.4/nanoplot_extlib/miniconda3-2019.07-sck6/lib/python3.7/site-packages/nanoplot/NanoPlot.py", line 105, in main
plots = make_plots(datadf, settings)
File "/programs/x86_64-linux/nanoplot/1.35.4/nanoplot_extlib/miniconda3-2019.07-sck6/lib/python3.7/site-packages/nanoplot/NanoPlot.py", line 174, in make_plots
title=settings["title"])
TypeError: 'NoneType' object is not iterable

@wdecoster
Copy link
Owner

Thanks for the update, I think I identified the issue and will provide a fix later tonight.

wdecoster added a commit that referenced this issue Apr 10, 2021
@wdecoster
Copy link
Owner

Thanks for your patience, the issue should be solved in NanoPlot v1.35.5.

Cheers,
Wouter

@vinaykl1
Copy link

Hi.

I am re-opening this issue since I am encountering this in v 1.44.0

Here's the log

2024-11-18 16:24:45,145 NanoPlot 1.44.0 started with arguments Namespace(threads=64, verbose=False, store=False, raw=False, huge=False, outdir='./', no_static=False, prefix='Black_naped_Monarch//00-RAW-DATA/ONT/SO_13255_Z4874_barcode91.fastq-QC', tsv_stats=True, only_report=False, info_in_report=False, maxlength=None, minlength=None, drop_outliers=False, downsample=None, loglength=False, percentqual=False, alength=False, minqual=None, runtime_until=None, readtype='1D', barcoded=False, no_supplementary=False, color='#4CB391', colormap='Greens', format=['png'], plots=['dot'], legacy=None, listcolors=False, listcolormaps=False, no_N50=False, N50=True, title=None, font_scale=1, dpi=100, hide_stats=False, fastq=['Black_naped_Monarch//00-RAW-DATA/ONT/SO_13255_Z4874_barcode91.fastq.gz'], fasta=None, fastq_rich=None, fastq_minimal=None, summary=None, bam=None, ubam=None, cram=None, pickle=None, feather=None, path='./Black_naped_Monarch//00-RAW-DATA/ONT/SO_13255_Z4874_barcode91.fastq-QC')
2024-11-18 16:24:45,146 Python version is: 3.10.13 | packaged by conda-forge | (main, Dec 23 2023, 15:36:39) [GCC 12.3.0]
2024-11-18 16:24:45,164 Nanoget: Starting to collect statistics from plain fastq file.
2024-11-18 16:24:45,164 Nanoget: Decompressing gzipped fastq Black_naped_Monarch//00-RAW-DATA/ONT/SO_13255_Z4874_barcode91.fastq.gz
2024-11-18 16:35:47,474 Reduced DataFrame memory usage from 26.068893432617188Mb to 26.068893432617188Mb
2024-11-18 16:35:47,522 Nanoget: Gathered all metrics of 1708443 reads
2024-11-18 16:35:48,212 Calculated statistics
2024-11-18 16:35:48,213 Using sequenced read lengths for plotting.
2024-11-18 16:35:48,247 NanoPlot: Valid color #4CB391.
2024-11-18 16:35:48,248 NanoPlot: Valid colormap Greens.
2024-11-18 16:35:48,301 NanoPlot: Creating length plots for Read length.
2024-11-18 16:35:48,302 NanoPlot: Using 1708443 reads with read length N50 of 17470bp and maximum of 194431bp.
2024-11-18 16:35:49,011 argument of type 'NoneType' is not iterable
Traceback (most recent call last):
File "/home/vkl1/miniconda/lib/python3.10/site-packages/nanoplot/NanoPlot.py", line 110, in main
plots = make_plots(datadf, settings)
File "/home/vkl1/miniconda/lib/python3.10/site-packages/nanoplot/NanoPlot.py", line 166, in make_plots
nanoplotter.length_plots(
File "/home/vkl1/miniconda/lib/python3.10/site-packages/nanoplotter/nanoplotter_main.py", line 454, in length_plots
histogram.save(settings)
File "/home/vkl1/miniconda/lib/python3.10/site-packages/nanoplotter/plot.py", line 50, in save
self.save_static(fmt)
File "/home/vkl1/miniconda/lib/python3.10/site-packages/nanoplotter/plot.py", line 80, in save_static
scope = PlotlyScope()
File "/home/vkl1/miniconda/lib/python3.10/site-packages/kaleido/scopes/plotly.py", line 64, in init
elif "snap" in path:
TypeError: argument of type 'NoneType' is not iterable

It fails to generate plots other than the HTML report and text file with stats even though I added -f pdf in the original command.

Thank you.

@wdecoster
Copy link
Owner

The cause appears to be described here
plotly/Kaleido#223

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants