Hi,
I have trouble with the following commands:
jupyter nbconvert --ExecutePreprocessor.kernel_name="julia-1.10" --to notebook --inplace --execute ${{ env.FILE }}
jupyter nbconvert --to script ${{ env.FILE }}
jupyter nbconvert --to markdown ${{ env.FILE }}
if a error arises in Julia and gets printed by the command. The error is known and valid. I am under the impression, that, in case of error within a code-cell, jupyter, and therefore nbconvert, should fail, but it does not.
Any ideas? (obviously I need the command to fail on error)
Output:
Starting kernel event loops.
Traceback (most recent call last):
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts\jupyter-nbconvert.EXE\__main__.py", line 7, in <module>
sys.exit(main())
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\jupyter_core\application.py", line 283, in launch_instance
super().launch_instance(argv=argv, **kwargs)
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\traitlets\config\application.py", line 1075, in launch_instance
app.start()
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbconvert\nbconvertapp.py", line 420, in start
self.convert_notebooks()
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbconvert\nbconvertapp.py", line 597, in convert_notebooks
self.convert_single_notebook(notebook_filename)
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbconvert\nbconvertapp.py", line 563, in convert_single_notebook
output, resources = self.export_single_notebook(
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbconvert\nbconvertapp.py", line 487, in export_single_notebook
output, resources = self.exporter.from_filename(
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbconvert\exporters\exporter.py", line 201, in from_filename
return self.from_file(f, resources=resources, **kw)
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbconvert\exporters\exporter.py", line 220, in from_file
return self.from_notebook_node(
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbconvert\exporters\notebook.py", line 36, in from_notebook_node
nb_copy, resources = super().from_notebook_node(nb, resources, **kw)
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbconvert\exporters\exporter.py", line 154, in from_notebook_node
nb_copy, resources = self._preprocess(nb_copy, resources)
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbconvert\exporters\exporter.py", line 353, in _preprocess
nbc, resc = preprocessor(nbc, resc)
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbconvert\preprocessors\base.py", line 48, in __call__
return self.preprocess(nb, resources)
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbconvert\preprocessors\execute.py", line 103, in preprocess
self.preprocess_cell(cell, resources, index)
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbconvert\preprocessors\execute.py", line 124, in preprocess_cell
cell = self.execute_cell(cell, index, store_history=True)
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\jupyter_core\utils\__init__.py", line 165, in wrapped
return loop.run_until_complete(inner)
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\asyncio\base_events.py", line 647, in run_until_complete
return future.result()
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbclient\client.py", line 1062, in async_execute_cell
await self._check_raise_for_error(cell, cell_index, exec_reply)
File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\nbclient\client.py", line 918, in _check_raise_for_error
raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
# imports
using FMI
[...]
------------------
----- stderr -----
Precompiling FMI
----- stderr -----
\u2717 BoundaryValueDiffEq
----- stderr -----
\u2717 DifferentialEquations
----- stderr -----
Info Given FMI was explicitly requested, output will be shown live
ERROR: LoadError: TypeError: in ODESolution [...]
Stacktrace:
----- stderr -----
[1] __solution_new_original_retcode
[...]
[18] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1746
[NbConvertApp] Converting notebook examples/jupyter-src/growing_horizon_ME.ipynb to script
[NbConvertApp] Writing 3891 bytes to examples\jupyter-src\growing_horizon_ME.jl
[NbConvertApp] Converting notebook examples/jupyter-src/growing_horizon_ME.ipynb to markdown
[NbConvertApp] Writing 15386 bytes to examples\jupyter-src\growing_horizon_ME.md