Skip to content

Commit

Permalink
Merge pull request #4675 from PrimozGodec/embedders-fix-machine-id
Browse files Browse the repository at this point in the history
[FIX] Embedder: catch machine id setting type error
  • Loading branch information
janezd authored May 8, 2020
2 parents b46e3e7 + 1ea754c commit 20f72be
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Orange/misc/server_embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 20f72be

Please sign in to comment.