Skip to content

Add workaround for orca segmentation fault #1140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions plotly/io/_orca.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <v1.2 will have a segmentation fault
# due to an electron bug.
# See: https://github.com/electron/electron/issues/12695
os.environ.pop('NODE_OPTIONS', None)

# Run executable with --help and see if it's our orca
# ---------------------------------------------------
invalid_executable_msg = """
Expand Down
2 changes: 1 addition & 1 deletion plotly/plotly/chunked_requests/chunked_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down