From f42f6b099b3af678efceb7800321c782ba72513e Mon Sep 17 00:00:00 2001 From: Golf Player <> Date: Tue, 19 May 2020 00:52:33 -0500 Subject: [PATCH] Stop trying to run `_async_cleanup_kernel` when the kernel_manager and kernel_client don't yet exist. --- nbclient/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nbclient/client.py b/nbclient/client.py index bbd92d88..7df2a39a 100644 --- a/nbclient/client.py +++ b/nbclient/client.py @@ -467,7 +467,7 @@ async def async_execute(self, **kwargs): The executed notebook. """ reset_kc = kwargs.get('reset_kc', False) - if reset_kc: + if reset_kc and self.km: await self._async_cleanup_kernel() self.reset_execution_trackers()