From 096fb5795d07a319eb10c2569b13eab5cf57e3c9 Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Wed, 29 Aug 2018 19:24:38 -0400 Subject: [PATCH 1/3] Workaround for https://github.com/plotly/orca/issues/124 Unset the NODE_OPTIONS environment variable before calling orca to avoid an orca segmentation fault --- plotly/io/_orca.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plotly/io/_orca.py b/plotly/io/_orca.py index d2f163d8d01..7a5f7b02d52 100644 --- a/plotly/io/_orca.py +++ b/plotly/io/_orca.py @@ -911,6 +911,13 @@ def validate_executable(): formatted_path=formatted_path, instructions=install_location_instructions)) + # Clear NODE_OPTIONS environment variable + # --------------------------------------- + # When this variable is set, orca Date: Thu, 30 Aug 2018 06:24:22 -0400 Subject: [PATCH 2/3] Constrain ipykernel version. Build was breaking on Python 2.7 with ipykernel 4.9 --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index a913d3c6ce4..25d10cc2547 100644 --- a/tox.ini +++ b/tox.ini @@ -61,6 +61,7 @@ deps= pytest==3.5.1 optional: numpy==1.11.3 optional: ipython[all]==5.1.0 + optional: ipykernel==4.8.2 optional: jupyter==1.0.0 optional: pandas==0.19.2 optional: scipy==0.18.1 From 1902cdad336db5a01361da8b59e20e81bb49658b Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Thu, 30 Aug 2018 07:30:14 -0400 Subject: [PATCH 3/3] Reconnect stream write on 502 errors Example test failure: ``` ====================================================================== ERROR: test_stream_single_points (plotly.tests.test_plot_ly.test_stream.test_stream.TestStreaming) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/circleci/project/plotly/tests/test_plot_ly/test_stream/test_stream.py", line 52, in test_stream_single_points my_stream.write(Scatter(x=[1], y=[10])) File "/home/circleci/project/plotly/plotly/plotly.py", line 704, in write self._stream.write(jdata, reconnect_on=reconnect_on) File "/home/circleci/project/plotly/plotly/chunked_requests/chunked_request.py", line 61, in write msg=response.read())) Exception: Server responded with status code: 502 and message:

502 Bad Gateway

The server returned an invalid or incomplete response. ``` --- plotly/plotly/chunked_requests/chunked_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/plotly/chunked_requests/chunked_request.py b/plotly/plotly/chunked_requests/chunked_request.py index eb70488f59c..e6392f0f8c7 100644 --- a/plotly/plotly/chunked_requests/chunked_request.py +++ b/plotly/plotly/chunked_requests/chunked_request.py @@ -25,7 +25,7 @@ def __init__(self, server, port=80, headers={}, url='/', ssl_enabled=False, self._ssl_verification_enabled = ssl_verification_enabled self._connect() - def write(self, data, reconnect_on=('', 200, )): + def write(self, data, reconnect_on=('', 200, 502)): ''' Send `data` to the server in chunk-encoded form. Check the connection before writing and reconnect if disconnected and if the response status code is in `reconnect_on`.