plotly / plotly/plotly.py

Plotly and tqdm in the same notebook cell causes blank plot

Open
#4,127 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

In a colab notebook, if a tqdm progress bar is being output in the same cell as a plotly plot, then rendering of the plotly plot fails. See MRE colab notebook.

In the chrome developer console I see "Uncaught ReferenceError: Plotly is not defined".

This problem appears in plotly.py version 5.12 and later. Version 5.11 is fine.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked minimal reproducible Colab notebook and reproduce the failure using plotly.py 5.12 or later with tqdm in the same cell, then compare it with version 5.11. Inspect the notebook rendering path involved in the "Plotly is not defined" console error; done means the plot renders correctly alongside the progress bar in the reported Colab setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.