Thanks to visit codestin.com Credit goes to github.com
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 32f8987 commit 159f194Copy full SHA for 159f194
packages/python/plotly/plotly/io/_base_renderers.py
@@ -609,11 +609,13 @@ def to_mimebundle(self, fig_dict):
609
610
def build_filename(self):
611
ip = IPython.get_ipython() if IPython else None
612
- cell_number = list(ip.history_manager.get_tail(1))[0][1] + 1 if ip else 0
613
- filename = "{dirname}/figure_{cell_number}.html".format(
+ try:
+ cell_number = list(ip.history_manager.get_tail(1))[0][1] + 1 if ip else 0
614
+ except Exception:
615
+ cell_number = 0
616
+ return "{dirname}/figure_{cell_number}.html".format(
617
dirname=self.html_directory, cell_number=cell_number
618
)
- return filename
619
620
def build_url(self, filename):
621
return filename
0 commit comments