Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cldougl opened this issue Nov 29, 2016 · 2 comments
Closed

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

cldougl opened this issue Nov 29, 2016 · 2 comments
Assignees
Labels
bug something broken

Comments

@cldougl
Copy link
Member

cldougl commented Nov 29, 2016

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

@cldougl cldougl added the bug something broken label Nov 29, 2016
@chriddyp
Copy link
Member

@Kully - can you fix, add a test, bump the version, and make a note in the changelog about this? We should release a fix asap

@cldougl
Copy link
Member Author

cldougl commented Dec 1, 2016

closed with #622

@cldougl cldougl closed this as completed Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

3 participants