NanoPlot 1.48 fails because Plotly is missing create_2d_density
Installation of Nanoplot through the conda -c bioconda distribution does not pin the correct package dependencies. The biggest issue is plotly (see below), but also using free-threaded versions of python (e.g., >3.14) will have a conflict with pysam.
The report below is for plotly 7.0.0 breaking Nanoplot, but the real issue is installing through conda doesn't follow pinned packages.
Description
NanoPlot fails while generating its plots with the following error:
AttributeError: module 'plotly.figure_factory' has no attribute 'create_2d_density'
The failure occurs in NanoPlot's plotting code when it calls:
plotly.figure_factory.create_2d_density(...)
Environment
Failing environment:
Python: 3.13.15
NanoPlot: 1.48.0
Plotly: 7.0.0
Check:
import plotly.figure_factory as ff
print(hasattr(ff, "create_2d_density"))
Output:
Comparison
The same input works with:
Python: 3.13.15
NanoPlot: 1.47.2
Plotly: 6.9.0
In that environment:
NanoPlot failure message
Usage
NanoPlot \
--barcoded \
--huge \
--threads 24 \
--tsv_stats \
--only-report \
--prefix "test_" \
--summary "sequencing_summary_.txt" \
--outdir "tmp_stats"
NanoPlot reports:
If you read this then NanoPlot 1.48.0 has crashed :-(
Please try updating NanoPlot and see if that helps...
The traceback ends with:
AttributeError: module 'plotly.figure_factory' has no attribute 'create_2d_density'
Expected behavior
NanoPlot should either:
- work with the current Plotly release, or
- specify a compatible Plotly version constraint.
NanoPlot 1.48 fails because Plotly is missing
create_2d_densityInstallation of Nanoplot through the conda -c bioconda distribution does not pin the correct package dependencies. The biggest issue is plotly (see below), but also using free-threaded versions of python (e.g., >3.14) will have a conflict with pysam.
The report below is for plotly 7.0.0 breaking Nanoplot, but the real issue is installing through conda doesn't follow pinned packages.
Description
NanoPlot fails while generating its plots with the following error:
The failure occurs in NanoPlot's plotting code when it calls:
Environment
Failing environment:
Check:
Output:
Comparison
The same input works with:
In that environment:
NanoPlot failure message
Usage
NanoPlot reports:
The traceback ends with:
Expected behavior
NanoPlot should either: