Skip to content

prettify (introduced with 0.2.3) breaks proxy if not attached to terminal #1

Closed
@sl077

Description

@sl077

I'm using this proxy with a custom docker container running on a current jupyterhub with dockerspawner.
When I try to start the matlab proxy via jupyterlab and jupyter-matlab-proxy, it keeps crashing and restarting in a loop, providing this log entry to the console:

...
Traceback (most recent call last):
  File "/opt/modules/envs/conda/20220215_matlab/bin/matlab-proxy-app", line 8, in <module>
    sys.exit(main())
  File "/opt/modules/envs/conda/20220215_matlab/lib/python3.9/site-packages/matlab_proxy/app.py", line 597, in main
    util.prettify(
  File "/opt/modules/envs/conda/20220215_matlab/lib/python3.9/site-packages/matlab_proxy/util/__init__.py", line 127, in prettify
    size = os.get_terminal_size()
OSError: [Errno 25] Inappropriate ioctl for device
...

I guess that in my setup the proxy is not connected to a tty, causing this error in os.get_terminal_size(). Removing the call to util.prettify() solves this problem for me and makes the proxy work.

Am I missing some required configuration step here, to make it work out-of-the-box?

Edit:
If it's important: System is a Debian bullseye amd64 Linux with jupyterhub 2.1.1, jupyterlab 3.2.9, jupyter-matlab-proxy 0.4.0 and matlab-proxy 0.2.3 running inside docker 5:20.10.12~3-0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions