Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 20043c0

Browse filesBrowse files
committed
temporary share key fix
1 parent 8fb58d5 commit 20043c0
Copy full SHA for 20043c0

File tree

2 files changed

+6
-3
lines changed
Filter options

2 files changed

+6
-3
lines changed

‎plotly/plotly/plotly.py

Copy file name to clipboardExpand all lines: plotly/plotly/plotly.py
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import copy
2020
import json
2121
import os
22+
import time
2223
import warnings
2324
import webbrowser
2425

@@ -1304,17 +1305,19 @@ def add_share_key_to_url(plot_url, attempt=0):
13041305
username = urlsplit.path.split('/')[1].split('~')[1]
13051306
idlocal = urlsplit.path.split('/')[2]
13061307
fid = '{}:{}'.format(username, idlocal)
1307-
13081308
body = {'share_key_enabled': True, 'world_readable': False}
13091309
response = v2.files.update(fid, body)
13101310

13111311
# Sometimes a share key is added, but access is still denied.
13121312
# Check that share_key_enabled is set to true and
13131313
# retry if this is not the case
13141314
# https://github.com/plotly/streambed/issues/4089
1315-
if not v2.files.retrieve(fid).json()['share_key_enabled']:
1315+
time.sleep(4)
1316+
share_key_enabled = v2.files.retrieve(fid).json()['share_key_enabled']
1317+
if not share_key_enabled:
13161318
attempt += 1
13171319
if attempt == 50:
1320+
print('Raising exception')
13181321
raise exceptions.PlotlyError(
13191322
"The sharekey could not be enabled at this time so the graph "
13201323
"is saved as private. Try again to save as 'secret' later."

‎plotly/version.py

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '2.0.13'
1+
__version__ = '2.0.14'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.