wrapper command for jupyter-notebook
when running in (e.g.) FSL, there is no jupyter-notebook
command. Write a wrapper function/command to invoke it, and thus avoid errors like this
Exception in thread Thread-9:
Traceback (most recent call last):
File "/home/paulmc/fsl/fsl-6.0.2/fslpython/envs/fslpython/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/home/paulmc/fsl/fsl-6.0.2/fslpython/envs/fslpython/lib/python3.7/site-packages/fsleyes/actions/notebook.py", line 630, in run
env=env)
File "/home/paulmc/fsl/fsl-6.0.2/fslpython/envs/fslpython/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/home/paulmc/fsl/fsl-6.0.2/fslpython/envs/fslpython/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'jupyter-notebook': 'jupyter-notebook'
ERROR status.py 161: reportIfError - Error initialising IPython/Jupyter: An error occurred initialising IPython/Jupyter!
Traceback (most recent call last):
File "/home/paulmc/fsl/fsl-6.0.2/fslpython/envs/fslpython/lib/python3.7/site-packages/fsleyes/actions/base.py", line 196, in wrapper
self()
File "/home/paulmc/fsl/fsl-6.0.2/fslpython/envs/fslpython/lib/python3.7/site-packages/fsleyes/actions/base.py", line 172, in __call__
return self.__func(*args, **kwargs)
File "/home/paulmc/fsl/fsl-6.0.2/fslpython/envs/fslpython/lib/python3.7/site-packages/fsleyes/actions/notebook.py", line 148, in __openNotebooks
self.__server = self.__startServer(progdlg, nbfile)
File "/home/paulmc/fsl/fsl-6.0.2/fslpython/envs/fslpython/lib/python3.7/site-packages/fsleyes/actions/notebook.py", line 209, in __startServer
'{}'.format(server.stderr))
RuntimeError: Could not start notebook server: None