From 02b54930a9a3b52f8c10597c5a57e8dc46397e70 Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Sun, 8 May 2016 23:32:22 +0200 Subject: [PATCH] browser: examine can fail --- artiq/browser/experiments.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/artiq/browser/experiments.py b/artiq/browser/experiments.py index 21a2617c6..7cbc97c0c 100644 --- a/artiq/browser/experiments.py +++ b/artiq/browser/experiments.py @@ -353,7 +353,12 @@ class ExperimentsArea(QtWidgets.QMdiArea): return self.current_dir = os.path.dirname(file) logger.info("opening experiment %s", file) - description = await self.examine(file) + try: + description = await self.examine(file) + except: + logger.error("Could not examine experiment '%s'", + file, exc_info=True) + return for class_name, class_desc in description.items(): expurl = "{}@{}".format(class_name, file) arguments = self.initialize_submission_arguments( @@ -380,7 +385,12 @@ class ExperimentsArea(QtWidgets.QMdiArea): async def compute_arginfo(self, expurl): class_name, file = expurl.split("@", maxsplit=1) - desc = await self.examine(file) + try: + desc = await self.examine(file) + except: + logger.error("Could not examine experiment '%s'", + file, exc_info=True) + return return desc[class_name]["arginfo"] def open_experiment(self, expurl, arguments):