Skip to content

offline plotting error when using domain other than plot.ly #621

Closed
@cldougl

Description

@cldougl

looks like this fix #599 doesn't work for onprem/other configs.
simple example run in updated version (1.12.10) with domain set to stage errors out with:

from plotly.offline import plot
from plotly.graph_objs import Scatter

plot([Scatter(x=[1, 2, 3], y=[3, 1, 6])])
UnboundLocalError                         Traceback (most recent call last)
<ipython-input-3-da4f268de5da> in <module>()
      2 from plotly.graph_objs import Scatter
      3 
----> 4 plot([Scatter(x=[1, 2, 3], y=[3, 1, 6])])

/Users/Chelsea/Repos/plotly.py/plotly/offline/offline.pyc in plot(figure_or_data, show_link, link_text, validate, output_type, include_plotlyjs, filename, auto_open, image, image_filename, image_width, image_height)
    444     plot_html, plotdivid, width, height = _plot_html(
    445         figure_or_data, config, validate,
--> 446         '100%', '100%', global_requirejs=False)
    447 
    448     resize_script = ''

/Users/Chelsea/Repos/plotly.py/plotly/offline/offline.pyc in _plot_html(figure_or_data, config, validate, default_width, default_height, global_requirejs)
    220                                                          'https://plot.ly')
    221     if (plotly_platform_url != 'https://plot.ly' and
--> 222             link_text == 'Export to plot.ly'):
    223 
    224         link_domain = plotly_platform_url\

UnboundLocalError: local variable 'link_text' referenced before assignment

cc @chriddyp @Kully

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions