Skip to content

Commit 60cf0ce

Browse files
committed
BF: Handle when value in DictCtrl has a syntax error
1 parent a7d2f39 commit 60cf0ce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

psychopy/app/builder/dialogs/paramCtrls.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,9 @@ def __init__(self, parent,
643643
if isinstance(val, dict):
644644
newVal = []
645645
for key, v in val.items():
646-
newVal.append({'Field': key, 'Default': v.val})
646+
if hasattr(v, "val"):
647+
v = v.val
648+
newVal.append({'Field': key, 'Default': v})
647649
val = newVal
648650
# If any items within the list are not dicts or are dicts longer than 1, throw error
649651
if not all(isinstance(v, dict) and len(v) == 2 for v in val):

0 commit comments

Comments
 (0)