crosscompute / jupyterlab-crosscompute

CrossCompute Extensions for JupyterLab: Automate Reports Using Python + Markdown + CSS
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Work properly even when the log_folder does not exist #22

Closed invisibleroads closed 1 year ago

invisibleroads commented 1 year ago

Launching an automation sometimes failed with a FileNotFoundError, seen from the client as "Unhandled error"

File "~/.virtualenvs/crosscompute/opt/jupyterlab-crosscompute/jupyterlab_crosscompute/handlers.py", line 63, in post
launch_state = make_launch_state(

File "~/.virtualenvs/crosscompute/opt/jupyterlab-crosscompute/jupyterlab_crosscompute/routines.py", line 76, in make_launch_state
], cwd=automation_folder, start_new_session=True, stdout=open(

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp_6b_8liy/launch/7011.log'

I think this happens because /tmp gets flushed periodically, perhaps on a rotating basis. I am leaning towards Option 1.

invisibleroads commented 1 year ago

On second thought, there might be security issues on machines where /tmp is shared among many users. Let's go with Option 2.