Jupyter 500 : Internal Server Error Opening any and all notebooks

Please provide the following information when requesting support.

I installed TAO 3.0 following the instructions from here:

https://docs.nvidia.com/tao/tao-toolkit-archive/tao-30-2108/text/tao_toolkit_quick_start_guide.html

Which recommends virtualenv and virtualenvwrapper ,

This is my current production base.

Installing the newest version of TAO following this:

https://docs.nvidia.com/tao/tao-toolkit/text/tao_toolkit_quick_start_guide.html#

This uses conda.

I installed with the following commands:

wget --content-disposition https://api.ngc.nvidia.com/v2/resources/nvidia/tao/tao-getting-started/versions/4.0.0/zip -O getting_started_v4.0.0.zip
unzip -u getting_started_v4.0.0.zip  -d ./getting_started_v4.0.0 && rm -rf getting_started_v4.0.0.zip && cd ./getting_started_v4.0.0

conda create -n TAO4 python=3.6
conda activate TAO4
bash setup/quickstart_launcher.sh --install

Then running

jupyter notebook

Openning any notebook results in error:

I also run

(TAO4) xxxxx@Axxxx:~/Downloads/getting_started_v4.0.0$ conda update nbconvert

This is the error from the jupyter console:

[E 13:15:24.390 NotebookApp] Uncaught exception GET /notebooks/notebooks/tao_launcher_starter_kit/unet/tao_isbi/unet_isbi.ipynb (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/notebooks/notebooks/tao_launcher_starter_kit/unet/tao_isbi/unet_isbi.ipynb', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/david/.local/lib/python3.8/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/home/david/.local/lib/python3.8/site-packages/tornado/gen.py", line 775, in run
        yielded = self.gen.send(value)
      File "/usr/lib/python3/dist-packages/notebook/notebook/handlers.py", line 95, in get
        self.write(self.render_template('notebook.html',
      File "/usr/lib/python3/dist-packages/notebook/base/handlers.py", line 507, in render_template
        return template.render(**ns)
      File "/home/david/.local/lib/python3.8/site-packages/jinja2/environment.py", line 1301, in render
        self.environment.handle_exception()
      File "/home/david/.local/lib/python3.8/site-packages/jinja2/environment.py", line 936, in handle_exception
        raise rewrite_traceback_stack(source=source)
      File "/usr/lib/python3/dist-packages/notebook/templates/notebook.html", line 1, in top-level template code
        {% extends "page.html" %}
      File "/usr/lib/python3/dist-packages/notebook/templates/page.html", line 153, in top-level template code
        {% block header %}
      File "/usr/lib/python3/dist-packages/notebook/templates/notebook.html", line 114, in block 'header'
        {% for exporter in get_frontend_exporters() %}
      File "/usr/lib/python3/dist-packages/notebook/notebook/handlers.py", line 23, in get_frontend_exporters
        from nbconvert.exporters.base import get_export_names, get_exporter
      File "/usr/lib/python3/dist-packages/nbconvert/__init__.py", line 4, in <module>
        from .exporters import *
      File "/usr/lib/python3/dist-packages/nbconvert/exporters/__init__.py", line 3, in <module>
        from .html import HTMLExporter
      File "/usr/lib/python3/dist-packages/nbconvert/exporters/html.py", line 12, in <module>
        from jinja2 import contextfilter
    ImportError: cannot import name 'contextfilter' from 'jinja2' (/home/david/.local/lib/python3.8/site-packages/jinja2/__init__.py)
[E 13:15:24.394 NotebookApp] {
      "Host": "localhost:8888",
      "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
      "Referer": "http://localhost:8888/tree/notebooks/tao_launcher_starter_kit/unet/tao_isbi",
      "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0"
    }
[E 13:15:24.394 NotebookApp] 500 GET /notebooks/notebooks/tao_launcher_starter_kit/unet/tao_isbi/unet_isbi.ipynb (127.0.0.1) 80.40ms referer=http://localhost:8888/tree/notebooks/tao_launcher_starter_kit/unet/tao_isbi

Thanks!

Solved with the following within the conda environment

conda update --all
pip install jupyter --upgrade

Cheers

1 Like

Thanks for sharing!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.