Linked Questions

Popular Questions

Jupyter notebook error 500 : Internal Server Error

Asked by At
[I 12:15:17.776 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 12:15:17.792 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/codiant/.local/share/jupyter/runtime/nbserver-1675506-open.html
    Or copy and paste one of these URLs:
        http://localhost:8889/?token=58c7f8b9e2431179b17d6c78231e9e2b5e05e8a6a5adf1b4
     or http://127.0.0.1:8889/?token=58c7f8b9e2431179b17d6c78231e9e2b5e05e8a6a5adf1b4
[E 12:15:20.846 NotebookApp] Uncaught exception GET /notebooks/functionality_functions.ipynb (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8889', method='GET', uri='/notebooks/functionality_functions.ipynb', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/codiant/.local/lib/python3.8/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/home/codiant/.local/lib/python3.8/site-packages/tornado/gen.py", line 782, in run
        yielded = self.gen.send(value)
      File "/home/codiant/.local/lib/python3.8/site-packages/notebook/notebook/handlers.py", line 94, in get
        self.write(self.render_template('notebook.html',
      File "/home/codiant/.local/lib/python3.8/site-packages/notebook/base/handlers.py", line 511, in render_template
        return template.render(**ns)
      File "/home/codiant/.local/lib/python3.8/site-packages/jinja2/environment.py", line 1301, in render
        self.environment.handle_exception()
      File "/home/codiant/.local/lib/python3.8/site-packages/jinja2/environment.py", line 936, in handle_exception
        raise rewrite_traceback_stack(source=source)
      File "/home/codiant/.local/lib/python3.8/site-packages/notebook/templates/notebook.html", line 1, in top-level template code
        {% extends "page.html" %}
      File "/home/codiant/.local/lib/python3.8/site-packages/notebook/templates/page.html", line 166, in top-level template code
        {% block header %}
      File "/home/codiant/.local/lib/python3.8/site-packages/notebook/templates/notebook.html", line 115, in block 'header'
        {% for exporter in get_frontend_exporters() %}
      File "/home/codiant/.local/lib/python3.8/site-packages/notebook/notebook/handlers.py", line 23, in get_frontend_exporters
        from nbconvert.exporters.base import get_export_names, get_exporter
      File "/home/codiant/.local/lib/python3.8/site-packages/nbconvert/exporters/__init__.py", line 4, in <module>
        from .html import HTMLExporter
      File "/home/codiant/.local/lib/python3.8/site-packages/nbconvert/exporters/html.py", line 26, in <module>
        from nbconvert.filters.markdown_mistune import IPythonRenderer, MarkdownWithMath
      File "/home/codiant/.local/lib/python3.8/site-packages/nbconvert/filters/markdown_mistune.py", line 23, in <module>
        import bs4
    ModuleNotFoundError: No module named 'bs4'
[E 12:15:20.851 NotebookApp] {
      "Host": "localhost:8889",
      "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
      "Referer": "http://localhost:8889/tree",
      "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"
    }
[E 12:15:20.851 NotebookApp] 500 GET /notebooks/functionality_functions.ipynb (127.0.0.1) 66.650000ms referer=http://localhost:8889/tree

i found this is working for my issue

conda install -c conda-forge jupyter_contrib_nbextensions

Related Questions