We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6eb94f0 commit 01a78d3Copy full SHA for 01a78d3
packages/python/plotly/plotly/io/_base_renderers.py
@@ -598,8 +598,8 @@ def to_mimebundle(self, fig_dict):
598
return {"text/html": iframe_html}
599
600
def build_filename(self):
601
- ip = IPython.get_ipython()
602
- cell_number = list(ip.history_manager.get_tail(1))[0][1] + 1
+ ip = IPython.get_ipython() if IPython else None
+ cell_number = list(ip.history_manager.get_tail(1))[0][1] + 1 if ip else 0
603
filename = "{dirname}/figure_{cell_number}.html".format(
604
dirname=self.html_directory, cell_number=cell_number
605
)
0 commit comments