plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Plotly and tqdm in the same notebook cell causes blank plot

Open alimanfoo opened this issue 2 years ago • 1 comments

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.

alimanfoo avatar Mar 28 '23 12:03 alimanfoo

Hi, I am not sure whether this has been resolved yet ( I am assuming it has not) but I think I have a workaround to your code which should enable you to view the progress bar and the plotly visualisation within one cell. colab notebook

Essentially rather than using from tqdm.auto import tqdm use from tqdm import tqdm and this should resolve the issues you have been having.

I hope this helps :)

SSivakumar12 avatar Sep 28 '24 18:09 SSivakumar12