From 20043c0b88a813a0e6dfd3a909ca49c45d2d9269 Mon Sep 17 00:00:00 2001 From: cldougl Date: Tue, 8 Aug 2017 17:11:59 -0400 Subject: [PATCH 1/2] temporary share key fix --- plotly/plotly/plotly.py | 7 +++++-- plotly/version.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plotly/plotly/plotly.py b/plotly/plotly/plotly.py index 93597fb0870..8791d79145b 100644 --- a/plotly/plotly/plotly.py +++ b/plotly/plotly/plotly.py @@ -19,6 +19,7 @@ import copy import json import os +import time import warnings import webbrowser @@ -1304,7 +1305,6 @@ def add_share_key_to_url(plot_url, attempt=0): username = urlsplit.path.split('/')[1].split('~')[1] idlocal = urlsplit.path.split('/')[2] fid = '{}:{}'.format(username, idlocal) - body = {'share_key_enabled': True, 'world_readable': False} response = v2.files.update(fid, body) @@ -1312,9 +1312,12 @@ def add_share_key_to_url(plot_url, attempt=0): # Check that share_key_enabled is set to true and # retry if this is not the case # https://github.com/plotly/streambed/issues/4089 - if not v2.files.retrieve(fid).json()['share_key_enabled']: + time.sleep(4) + share_key_enabled = v2.files.retrieve(fid).json()['share_key_enabled'] + if not share_key_enabled: attempt += 1 if attempt == 50: + print('Raising exception') raise exceptions.PlotlyError( "The sharekey could not be enabled at this time so the graph " "is saved as private. Try again to save as 'secret' later." diff --git a/plotly/version.py b/plotly/version.py index 79d5280f2fb..8890852d64f 100644 --- a/plotly/version.py +++ b/plotly/version.py @@ -1 +1 @@ -__version__ = '2.0.13' +__version__ = '2.0.14' From ff08e8fbf8c5771f0b51b3f9995924e8ba01df63 Mon Sep 17 00:00:00 2001 From: cldougl Date: Wed, 9 Aug 2017 13:23:46 -0400 Subject: [PATCH 2/2] remove print statement and update changelog --- CHANGELOG.md | 5 +++++ plotly/plotly/plotly.py | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6d2e17ce9d..88b5b1d000e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2.0.14] - 2017-08-09 +### Fixed +- [Sharekey enabling issue](https://github.com/plotly/plotly.py/issues/719) where plots were made private instead of secret. +- Issue removing rug plots from violin plots with multiple traces. + ## [2.0.13] - 2017-08-04 ### Updated - Updated `plotly.min.js` to version 1.29.1 for `plotly.offline`. diff --git a/plotly/plotly/plotly.py b/plotly/plotly/plotly.py index 8791d79145b..73c2182aac4 100644 --- a/plotly/plotly/plotly.py +++ b/plotly/plotly/plotly.py @@ -1317,7 +1317,6 @@ def add_share_key_to_url(plot_url, attempt=0): if not share_key_enabled: attempt += 1 if attempt == 50: - print('Raising exception') raise exceptions.PlotlyError( "The sharekey could not be enabled at this time so the graph " "is saved as private. Try again to save as 'secret' later."