From a006b87546b819502ebb43c6d616715dfa7fff53 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 6 Feb 2022 13:23:54 -0500 Subject: [PATCH] Exit `.maxmin()` early on non-yet-registered array lookup --- piker/ui/_chart.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index f4a3c19e..74ef2891 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -1164,7 +1164,10 @@ class ChartPlotWidget(pg.PlotWidget): # f"begin: {begin}, end: {end}, extra: {extra}" # ) - a = self._arrays[name or self.name] + a = self._arrays.get(name or self.name) + if a is None: + return None + ifirst = a[0]['index'] bars = a[lbar - ifirst:rbar - ifirst + 1]