Jupyter Notebook - Scilab plotting error

I am attempting to run Scilab from the Jupyter environment.

I am running on Windows 11 and installed Jupyter Lab through pip and the program launches successfully. Using the guides on this page I have setup the Scilab kernel for Jupyter lab and am able to execute Scilab functions from the Jupyter window.

When attempting to plot however, the code connects and then gives no output. When I open the CMD window that is running Jupyter I get the following error message:

[E 2024-10-03 08:28:02.888 ServerApp] 500 GET /lab/api/extensions?query&page=1&per_page=30&refresh=0&1727965681666 (41120dbcea3c496f9d972ec0528a7d4c@::1) 1220.27ms referer=http://localhost:8888/lab
[I 2024-10-03 08:28:06.439 ServerApp] Kernel started: b7acebed-0053-4f50-a046-8834e086340b
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[MetaKernelApp] WARNING | executable in the path: C:\Tools\Scilab-2024.1.0\bin\WScilex-cli.EXE
[MetaKernelApp] WARNING |  scilab_kernel._banner: 2024.1.0
[I 2024-10-03 08:28:19.974 ServerApp] Connecting to kernel b7acebed-0053-4f50-a046-8834e086340b.
[I 2024-10-03 08:28:19.983 ServerApp] Connecting to kernel b7acebed-0053-4f50-a046-8834e086340b.
[I 2024-10-03 08:28:20.007 ServerApp] Connecting to kernel b7acebed-0053-4f50-a046-8834e086340b.
[MetaKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\scilab_kernel\kernel.py", line 277, in extract_figures
    im = Image(filename)
         ^^^^^^^^^^^^^^^
  File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\IPython\core\display.py", line 961, in __init__
    raise ValueError("Cannot embed the '%s' image format" % (self.format))
ValueError: Cannot embed the 'c:\users\username~1.new\appdata\local\temp\tmpo1pbjxic\__ipy_sci_fig_001' image format

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\ipykernel\kernelbase.py", line 412, in dispatch_shell
    await result
  File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\ipykernel\kernelbase.py", line 731, in execute_request
    reply_content = self.do_execute(
                    ^^^^^^^^^^^^^^^^
  File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\metakernel\_metakernel.py", line 397, in do_execute
    retval = self.do_execute_direct(code)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\scilab_kernel\kernel.py", line 179, in do_execute_direct
    for image in self.extract_figures(plot_dir):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\username\AppData\Local\Programs\Python\Python311\Lib\site-packages\scilab_kernel\kernel.py", line 280, in extract_figures
    if self.error_handler:
       ^^^^^^^^^^^^^^^^^^
AttributeError: 'ScilabKernel' object has no attribute 'error_handler'

The code I am running is intentionally simple to test the plotting functionality

x = linspace(0, 10, 10)
plot(x)

When I navigate to the tmp location called out in the error, _ipy_sci_fig_001 is present but does not have a data type. I was able to open the file in GIMP and the graph has been created so it seems the problem is in the handoff after graphic creation.

How best can I troubleshoot this connection?

I am on Windows 10 pro x64. I have only one python 3.12.7 currently and latest jupyter lab an scilab extension. I keep everything updated like this

In windows, open git bash and execute

python -m pip list --outdated  | awk  'BEGIN{xxx=1}{ if (xxx > 2) {print $1}; xxx+=1}' | xargs -n1 python -m pip install -U

Your snippet works very fine.