Skip to content

Commit 4a73c17

Browse files
authored
Merge pull request #814 from plotly/sharekey_err
temporary share key fix
2 parents 8fb58d5 + ff08e8f commit 4a73c17

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

Diff for: CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [2.0.14] - 2017-08-09
6+
### Fixed
7+
- [Sharekey enabling issue](https://github.com/plotly/plotly.py/issues/719) where plots were made private instead of secret.
8+
- Issue removing rug plots from violin plots with multiple traces.
9+
510
## [2.0.13] - 2017-08-04
611
### Updated
712
- Updated `plotly.min.js` to version 1.29.1 for `plotly.offline`.

Diff for: plotly/plotly/plotly.py

+4-2
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,15 +1305,16 @@ 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:
13181320
raise exceptions.PlotlyError(

Diff for: plotly/version.py

+1-1
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)