From 16cf6b7a2dfdbe9cd718342d44234f452660fc66 Mon Sep 17 00:00:00 2001 From: Quentin Peter Date: Sat, 11 Nov 2023 15:10:02 +0100 Subject: [PATCH 1/2] send back error correctly --- spyder_kernels/comms/commbase.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spyder_kernels/comms/commbase.py b/spyder_kernels/comms/commbase.py index 4ac912a5..fdccd9eb 100644 --- a/spyder_kernels/comms/commbase.py +++ b/spyder_kernels/comms/commbase.py @@ -317,6 +317,10 @@ def _handle_remote_call(self, msg, buffer): """Handle a remote call.""" msg_dict = msg['content'] self.on_incoming_call(msg_dict) + if msg['content']['is_error']: + # could not open the pickle + self._set_call_return_value(msg, buffer, is_error=True) + return try: return_value = self._remote_callback( msg_dict['call_name'], From 5e31790bea24cb9f96af71f99f5495b1129b70a7 Mon Sep 17 00:00:00 2001 From: Quentin Peter Date: Sat, 11 Nov 2023 16:42:10 +0100 Subject: [PATCH 2/2] fix --- spyder_kernels/comms/commbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spyder_kernels/comms/commbase.py b/spyder_kernels/comms/commbase.py index fdccd9eb..20e3a8a3 100644 --- a/spyder_kernels/comms/commbase.py +++ b/spyder_kernels/comms/commbase.py @@ -317,7 +317,7 @@ def _handle_remote_call(self, msg, buffer): """Handle a remote call.""" msg_dict = msg['content'] self.on_incoming_call(msg_dict) - if msg['content']['is_error']: + if msg['content'].get('is_error', False): # could not open the pickle self._set_call_return_value(msg, buffer, is_error=True) return