From 1ea754c0e021f847d10147a9e3cb0e4a01f67a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Primo=C5=BE=20Godec?= Date: Mon, 20 Apr 2020 09:04:50 +0200 Subject: [PATCH] Embedder: catch machine id setting type error --- Orange/misc/server_embedder.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Orange/misc/server_embedder.py b/Orange/misc/server_embedder.py index 87e372d37cc..22c03a233a4 100644 --- a/Orange/misc/server_embedder.py +++ b/Orange/misc/server_embedder.py @@ -60,9 +60,14 @@ def __init__( # attribute that offers support for cancelling the embedding # if ran in another thread self._cancelled = False - self.machine_id = QSettings().value( - "error-reporting/machine-id", "", type=str - ) or str(uuid.getnode()) + + self.machine_id = None + try: + self.machine_id = QSettings().value( + "error-reporting/machine-id", "", type=str + ) or str(uuid.getnode()) + except TypeError: + self.machine_id = str(uuid.getnode()) self.session_id = str(random.randint(1, 1e10)) self._cache = EmbedderCache(model_name)