plotly / plotly.py

The interactive graphing library for Python :sparkles: This project now includes Plotly Express!
https://plotly.com/python/
MIT License
16.07k stars 2.54k forks source link

Plotly and tqdm in the same notebook cell causes blank plot #4127

Open alimanfoo opened 1 year ago

alimanfoo commented 1 year ago

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.

SSivakumar12 commented 2 days ago

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 :)