From 20d91af0dda13d5a2d45cf0b7f46c0e4c396d449 Mon Sep 17 00:00:00 2001 From: Matthew Wardrop Date: Thu, 23 May 2019 16:51:00 -0700 Subject: [PATCH] Fix honouring of `validate=False` for interactive plots. --- plotly/io/_base_renderers.py | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/plotly/io/_base_renderers.py b/plotly/io/_base_renderers.py index 9dbc3a222f..bfe7bb01fd 100644 --- a/plotly/io/_base_renderers.py +++ b/plotly/io/_base_renderers.py @@ -122,7 +122,9 @@ def to_mimebundle(self, fig_dict): format=self.format, width=self.width, height=self.height, - scale=self.scale) + scale=self.scale, + validate=False, + ) if self.b64_encode: image_str = base64.b64encode(image_bytes).decode('utf8') @@ -354,6 +356,7 @@ def to_mimebundle(self, fig_dict): animation_opts=self.animation_opts, default_width='100%', default_height=525, + validate=False, ) return {'text/html': html} @@ -503,18 +506,20 @@ def to_mimebundle(self, fig_dict): # Make directory for os.makedirs(dirname, exist_ok=True) - write_html(fig_dict, - filename, - config=self.config, - auto_play=self.auto_play, - include_plotlyjs='directory', - include_mathjax='cdn', - auto_open=False, - post_script=self.post_script, - animation_opts=self.animation_opts, - default_width='100%', - default_height=525, - validate=False) + write_html( + fig_dict, + filename, + config=self.config, + auto_play=self.auto_play, + include_plotlyjs='directory', + include_mathjax='cdn', + auto_open=False, + post_script=self.post_script, + animation_opts=self.animation_opts, + default_width='100%', + default_height=525, + validate=False, + ) # Build IFrame iframe_html = """\ @@ -629,5 +634,6 @@ def render(self, fig_dict): animation_opts=self.animation_opts, default_width='100%', default_height='100%', + validate=False, ) open_html_in_browser(html, self.using, self.new, self.autoraise)