Skip to content

NanoPlot 1.48 fails because Plotly is missing create_2d_density #442

Description

@nvsaxd

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:

False

Comparison

The same input works with:

Python: 3.13.15
NanoPlot: 1.47.2
Plotly: 6.9.0

In that environment:

create_2d_density: True

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.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions