From 68ae16d9b84e5ecffee635aebd5f004e1bfb2891 Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Fri, 2 Jul 2021 10:12:45 +0200 Subject: [PATCH] Use BaseException instead of Exception to catch GeneratorExit failures --- voila/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voila/handler.py b/voila/handler.py index f7d77f25b..20e9c4358 100644 --- a/voila/handler.py +++ b/voila/handler.py @@ -218,7 +218,7 @@ async def _jinja_cell_generator(self, nb, kernel_id): self.executor.strip_code_cell_errors(input_cell) output_cell = input_cell break - except Exception as e: + except BaseException as e: self.log.exception('Error at server while executing cell: %r', input_cell) output_cell = nbformat.v4.new_code_cell() if self.executor.should_strip_error():