From 6f3a47f901cb3babd88ba26826924bbd1ea46dc4 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Thu, 19 Sep 2019 07:54:44 +1000 Subject: [PATCH] Improve error handling when loading files --- daqviewer/daqviewer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daqviewer/daqviewer.py b/daqviewer/daqviewer.py index 47da141..5fd9dc7 100644 --- a/daqviewer/daqviewer.py +++ b/daqviewer/daqviewer.py @@ -233,7 +233,7 @@ def read_json_data(json_data): html.Div() ]) - elif json.loads(json_data)['error']: + elif 'error' in json.loads(json_data): filename = json.loads(json_data)['error'] elements = html.Div([ dcc.Graph(figure={