From 15ed584dc30485dc72643785fe45a7cb05efa426 Mon Sep 17 00:00:00 2001 From: Deepskyhunter Date: Mon, 13 Jun 2022 12:40:42 +0800 Subject: [PATCH] Bugfix: Add missing item inside state to solve KeyError KeyError raised when trying to load default_state() due to missing Key "seed" in "RangeScan" and "CenterScan" in state. Add {"seed": None} to resolve the bug. --- artiq/gui/entries.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/artiq/gui/entries.py b/artiq/gui/entries.py index b63be3902..d3d0ff8fb 100644 --- a/artiq/gui/entries.py +++ b/artiq/gui/entries.py @@ -427,9 +427,10 @@ class ScanEntry(LayoutWidget): "selected": "NoScan", "NoScan": {"value": 0.0, "repetitions": 1}, "RangeScan": {"start": 0.0, "stop": 100.0*scale, "npoints": 10, - "randomize": False}, + "randomize": False, "seed": None}, "CenterScan": {"center": 0.*scale, "span": 100.*scale, - "step": 10.*scale, "randomize": False}, + "step": 10.*scale, "randomize": False, + "seed": None}, "ExplicitScan": {"sequence": []} } if "default" in procdesc: