Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recent jupyterhub servers crash with error from jinja2 version 3.1.0 #1636

Closed
valerioa opened this issue Mar 25, 2022 · 2 comments
Closed

Recent jupyterhub servers crash with error from jinja2 version 3.1.0 #1636

valerioa opened this issue Mar 25, 2022 · 2 comments

Comments

@valerioa
Copy link

Recent jupyterhub servers crash with this error from jinja2

    Traceback (most recent call last):
      File "/opt/conda/lib/python3.9/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/opt/conda/lib/python3.9/site-packages/tornado/gen.py", line 775, in run
        yielded = self.gen.send(value)
      File "/opt/conda/lib/python3.9/site-packages/notebook/notebook/handlers.py", line 95, in get
        self.write(self.render_template('notebook.html',
      File "/opt/conda/lib/python3.9/site-packages/notebook/base/handlers.py", line 516, in render_template
        return template.render(**ns)
      File "/opt/conda/lib/python3.9/site-packages/jinja2/environment.py", line 1291, in render
        self.environment.handle_exception()
      File "/opt/conda/lib/python3.9/site-packages/jinja2/environment.py", line 926, in handle_exception
        raise rewrite_traceback_stack(source=source)
      File "/opt/conda/lib/python3.9/site-packages/notebook/templates/notebook.html", line 1, in top-level template code
        {% extends "page.html" %}
      File "<template>", line 2, in top-level template code
      File "/opt/conda/lib/python3.9/site-packages/notebook/templates/page.html", line 154, in top-level template code
        {% block header %}
      File "/opt/conda/lib/python3.9/site-packages/notebook/templates/notebook.html", line 115, in block 'header'
        {% for exporter in get_frontend_exporters() %}
      File "/opt/conda/lib/python3.9/site-packages/notebook/notebook/handlers.py", line 23, in get_frontend_exporters
        from nbconvert.exporters.base import get_export_names, get_exporter
      File "/opt/conda/lib/python3.9/site-packages/nbconvert/__init__.py", line 4, in <module>
        from .exporters import *
      File "/opt/conda/lib/python3.9/site-packages/nbconvert/exporters/__init__.py", line 3, in <module>
        from .html import HTMLExporter
      File "/opt/conda/lib/python3.9/site-packages/nbconvert/exporters/html.py", line 14, in <module>
        from jinja2 import contextfilter
    ImportError: cannot import name 'contextfilter' from 'jinja2' (/opt/conda/lib/python3.9/site-packages/jinja2/__init__.py)

Describe how to replicate the bug.
Install and run latersversion of jupyterhub

Describe the expected behavior that should have happened but didn't.
jupyterhub should not e crashing,.

Environment:

  • Python version: Python 3.7.10
  • Jinja version: 3.1.0
@davidism
Copy link
Member

Duplicate of #1626

@davidism davidism marked this as a duplicate of #1626 Mar 25, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants