Hello. Firstly, thank you so much for this extension. It really is awesome!
We have used it for quite some days/months with the jupyter/pyspark-notebook docker image.
We noticed it started to raise an error when we tried to save the .md notebooks inside jupyter:
Stacktrace:
foo_bar_1 | [E 14:38:26.584 NotebookApp] Error while saving file: foo.md display_priority.j2
foo_bar_1 | Traceback (most recent call last):
foo_bar_1 | File "/opt/conda/lib/python3.8/site-packages/notebook/services/contents/filemanager.py", line 476, in save
foo_bar_1 | self._save_notebook(os_path, nb)
foo_bar_1 | File "/opt/conda/lib/python3.8/site-packages/notedown/contentsmanager.py", line 59, in _save_notebook
foo_bar_1 | markdown = convert(nbjson,
foo_bar_1 | File "/opt/conda/lib/python3.8/site-packages/notedown/main.py", line 104, in convert
foo_bar_1 | return writer.writes(notebook)
foo_bar_1 | File "/opt/conda/lib/python3.8/site-packages/notedown/notedown.py", line 434, in writes
foo_bar_1 | body, resources = self.exporter.from_notebook_node(notebook)
foo_bar_1 | File "/opt/conda/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 384, in from_notebook_node
foo_bar_1 | output = self.template.render(nb=nb_copy, resources=resources)
foo_bar_1 | File "/opt/conda/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
foo_bar_1 | self.environment.handle_exception()
foo_bar_1 | File "/opt/conda/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
foo_bar_1 | reraise(*rewrite_traceback_stack(source=source))
foo_bar_1 | File "/opt/conda/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
foo_bar_1 | raise value.with_traceback(tb)
foo_bar_1 | File "/opt/conda/lib/python3.8/site-packages/notedown/templates/markdown.tpl", line 1, in top-level template code
foo_bar_1 | {% extends 'display_priority.tpl' %}
foo_bar_1 | File "/opt/conda/share/jupyter/nbconvert/templates/compatibility/display_priority.tpl", line 2, in top-level template code
foo_bar_1 | {%- extends 'display_priority.j2' -%}
foo_bar_1 | jinja2.exceptions.TemplateNotFound: display_priority.j2
foo_bar_1 | [W 14:38:26.585 NotebookApp] 500 PUT /api/contents/foo.md (172.22.0.1): Unexpected error while saving file: foo.md display_priority.j2
foo_bar_1 | [W 14:38:26.585 NotebookApp] Unexpected error while saving file: foo.md display_priority.j2
Setup
Dockerfile
FROM jupyter/pyspark-notebook
RUN python -m pip install --upgrade --force-reinstall --ignore-installed pip
ADD requirements.txt .
RUN pip install --quiet -r requirements.txt
RUN echo 'c.NotebookApp.contents_manager_class = "notedown.NotedownContentsManager"' >> ~/.jupyter/jupyter_notebook_config.py
Hello. Firstly, thank you so much for this extension. It really is awesome!
We have used it for quite some days/months with the
jupyter/pyspark-notebook
docker image. We noticed it started to raise an error when we tried to save the .md notebooks inside jupyter:Stacktrace:
Setup
Dockerfile
Dependencies