Skip to content

Commit 4388e28

Browse files
committed
updated the son loads to pass string (for python 3.3)
1 parent 6bcde8b commit 4388e28

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

plotly/plotly/plotly.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,10 @@ def add_share_key_to_url(plot_url):
13911391

13921392
_api_v2.response_handler(new_response)
13931393

1394-
new_response_data = json.loads(new_response.content)
1394+
# decode bytes for python 3.3: https://bugs.python.org/issue10976
1395+
str_content = new_response.content.decode('utf-8')
1396+
1397+
new_response_data = json.loads(str_content)
13951398
plot_url += '?share_key=' + new_response_data['share_key']
13961399

13971400
return plot_url

plotly/tests/test_core/test_plotly/test_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def test_plot_option_logic_only_sharing_given(self):
173173
'sharing': 'private'}
174174
self.assertEqual(plot_option_logic, expected_plot_option_logic)
175175

176-
@skip('added to see if everything else passes on circle')
176+
# @skip('added to see if everything else passes on circle')
177177
def test_plot_url_given_sharing_key(self):
178178

179179
# Give share_key is requested, the retun url should contain

0 commit comments

Comments
 (0)