From 3b1fa572fab2acab4debc6dd85d0cb3085283557 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 4 Dec 2017 16:18:45 +0200 Subject: [PATCH] Handle unicode errors --- platformio/telemetry.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platformio/telemetry.py b/platformio/telemetry.py index 671fe20c..75fa307f 100644 --- a/platformio/telemetry.py +++ b/platformio/telemetry.py @@ -320,7 +320,10 @@ def on_exception(e): exception.NotPlatformIOProject, exception.UserSideException) ] - skip_conditions.append("[API] Account: " in str(e)) + try: + skip_conditions.append("[API] Account: " in str(e)) + except UnicodeEncodeError as ue: + e = ue if any(skip_conditions): return is_crash = any([