Skip to content

Commit f316280

Browse files
committed
fix the error that prevents from setting some options
1 parent d61f0de commit f316280

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/shared.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ def __setattr__(self, key, value):
406406
if key in self.data or key in self.data_labels:
407407
assert not cmd_opts.freeze_settings, "changing settings is disabled"
408408

409-
comp_args = opts.data_labels[key].component_args
409+
info = opts.data_labels.get(key, None)
410+
comp_args = info.component_args if info else None
410411
if isinstance(comp_args, dict) and comp_args.get('visible', True) is False:
411412
raise RuntimeError(f"not possible to set {key} because it is restricted")
412413

0 commit comments

Comments
 (0)