From d95f0798643905b4df2346a7ee0839820024f924 Mon Sep 17 00:00:00 2001 From: Tucker Alban Date: Wed, 8 Feb 2023 09:27:20 -0500 Subject: [PATCH] Fixed an error on closing envision when envision is connected. (#1843) * Fixed an error on closing envision when envision is connected. * Update changelog. --- CHANGELOG.md | 1 + envision/client.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae30f2eaab..a50e9eb2f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Copy and pasting the git commit messages is __NOT__ enough. ### Changed ### Deprecated ### Fixed +- Fixed an exit error that occurs when envision attempts to close down. - Clarified the actions for `ActionSpaceType.Continuous` and `ActionSpaceType.ActuatorDynamic` in their respective docstrings. - Excluded from wheel any scenario build files in pattern `smarts/**/build/**/*.xml`. ### Removed diff --git a/envision/client.py b/envision/client.py index 71a8c8619f..9b1189a4fc 100644 --- a/envision/client.py +++ b/envision/client.py @@ -173,7 +173,7 @@ def _write_log_state( with path.open("w", encoding="utf-8") as f: while True: state = queue.get() - if type(state) is Client.QueueDone: + if isinstance(state, Client.QueueDone) or state is None: break if not isinstance(state, str): @@ -260,7 +260,7 @@ def on_open(ws): while True: state = state_queue.get() - if isinstance(type(state), Client.QueueDone): + if isinstance(state, Client.QueueDone) or state is None: break optionally_serialize_and_write(state, ws)