mathworks/jupyter-matlab-proxy

restarting the MATLAB kernel => no attribute 'murl'

jhgoebbert opened this issue · 1 comments

Hi,

I came across this error when I tried to restart the MATLAB kernel:

[IPKernelApp] ERROR | Exception in control handler:
Traceback (most recent call last):
  File "/p/software/jurecadc/stages/2023/software/IPython/8.14.0-GCCcore-11.3.0/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 337, in process_control
    await result
  File "/p/software/jurecadc/stages/2023/software/IPython/8.14.0-GCCcore-11.3.0/lib/python3.10/site-packages/ipykernel/kernelbase.py", line 923, in shutdown_request
    content = self.do_shutdown(parent["content"]["restart"])
  File "/p/usersoftware/swmanage/goebbert1/stage2023/JupyterLab/easybuild/jurecadc/software/JupyterProxy-Matlab/0.7.1-GCCcore-11.3.0-2023.3.6/lib/python3.10/site-packages/jupyter_matlab_kernel/kernel.py", line 403, in do_shutdown
    self.murl, self.headers, self.ident
AttributeError: 'MATLABKernel' object has no attribute 'murl'

This happens if the line self.murl, self.server_base_url, self.headers = start_matlab_proxy() fails and self.murl does not get set:
https://github.com/mathworks/jupyter-matlab-proxy/blob/main/src/jupyter_matlab_kernel/kernel.py#L229

In our case this is related to the following #62 which makes start_matlab_proxy() fail.