summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGeorge Steel <george.steel@gmail.com>2022-12-26 20:10:10 -0500
committerGeorge Steel <george.steel@gmail.com>2022-12-26 20:10:10 -0500
commitb63f19b2d0747769c60c8a2a52489ee30fa02a07 (patch)
treec4808b43bdf1e071d92d93eed002ea71e692011c /lib
parent7d60b8e9d31ff8b0d98eba2bbc5ad9415c18170d (diff)
fix seed param and error messages
Diffstat (limited to 'lib')
-rw-r--r--lib/elements/element.py2
-rw-r--r--lib/extensions/params.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/elements/element.py b/lib/elements/element.py
index e7eb4dea..75f9fc10 100644
--- a/lib/elements/element.py
+++ b/lib/elements/element.py
@@ -261,7 +261,7 @@ class EmbroideryElement(object):
sort_index=100)
@cache
def random_seed(self) -> str:
- seed = self.get_param('random_seed')
+ seed = self.get_param('random_seed', '')
if not seed:
seed = self.node.get_id() or ''
# TODO(#1696): When inplementing grouped clones, join this with the IDs of any shadow roots,
diff --git a/lib/extensions/params.py b/lib/extensions/params.py
index a568573f..306e5e56 100644
--- a/lib/extensions/params.py
+++ b/lib/extensions/params.py
@@ -7,6 +7,7 @@
import os
import sys
+import traceback
from collections import defaultdict
from copy import copy
from itertools import groupby, zip_longest
@@ -511,9 +512,10 @@ class SettingsFrame(wx.Frame):
except SystemExit:
wx.CallAfter(self._show_warning)
raise
- except Exception:
+ except Exception as e:
# Ignore errors. This can be things like incorrect paths for
# satins or division by zero caused by incorrect param values.
+ traceback.print_exception(e, file=sys.stderr)
pass
return patches