I am running a Julia script in a Jupyter Notebook on a remote host by using the following command in a jupyter-environment
jupyter nbconvert --to notebook --execute my_notebook.ipynb
which works fine. However, if I try to pass arguments to the Jupyter Notebook with the intention to be finally passed to the Julia script I fail. My question is how to do it?
- To pass arguments to the Jupyter Notebook I modified the above command to
jupyter nbconvert --to notebook --execute my_notebook.ipynb arg1 arg2 arg3
- Also, in the Julia script I try to recover the arguments (which are supposed to be small enough integers) via
x1 = parse(Int16, ARGS[1])
x2 = parse(Int16, ARGS[2])
x3 = parse(Int16, ARGS[3])
which doesn't work.
- I tried to understand what is in ARGS, but I can't decipher what it means. The output of
println(ARGS)
included in the Julia script is
"/tmp/tmp8vuj5f79.json"
Coming back to the second bullet point, a few errors occur since ARGS[1] obviously can't be converted to an integer.
- Another error which occurs when passing the arguments to the Jupyter Notebook execution is
[NbConvertApp] WARNING | pattern 'arg1' matched no files
[NbConvertApp] WARNING | pattern 'arg2' matched no files
[NbConvertApp] WARNING | pattern 'arg3' matched no files
I might be approaching the problem from a completely wrong perspective, so any help would be very much appreciated!