Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 61ddcd2

Browse files
committed
🐛 get the correct plotly_domain, not the "session"'s
1 parent bb29e74 commit 61ddcd2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

plotly/offline/offline.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
import warnings
1212
from pkg_resources import resource_string
1313

14-
from plotly import session, tools, utils
14+
import plotly
15+
from plotly import tools, utils
1516
from plotly.exceptions import PlotlyError
1617

1718

@@ -129,8 +130,10 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
129130
config['linkText'] = link_text
130131
jconfig = json.dumps(config)
131132

132-
plotly_platform_url = session.get_session_config().get('plotly_domain',
133-
'https://plot.ly')
133+
# TODO: The get_config 'source of truth' should
134+
# really be somewhere other than plotly.plotly
135+
plotly_platform_url = plotly.plotly.get_config().get('plotly_domain',
136+
'https://plot.ly')
134137
if (plotly_platform_url != 'https://plot.ly' and
135138
link_text == 'Export to plot.ly'):
136139

0 commit comments

Comments
 (0)