You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to set up Sphinx in a new repo and I'm running into an error with Jinja2. It errors when I use Jinja2 v3.1.1, but is fine with v3.0.3.
$ poetry run sphinx-apidoc -o source/ ../folder
Traceback (most recent call last):
File "/Users/mvadari/Documents/folder/.venv/bin/sphinx-apidoc", line 5, in<module>
from sphinx.ext.apidoc import main
File "/Users/mvadari/Documents/folder/.venv/lib/python3.8/site-packages/sphinx/ext/apidoc.py", line 31, in<module>
from sphinx.cmd.quickstart import EXTENSIONS
File "/Users/mvadari/Documents/folder/.venv/lib/python3.8/site-packages/sphinx/cmd/quickstart.py", line 44, in<module>
from sphinx.util.template import SphinxRenderer
File "/Users/mvadari/Documents/folder/.venv/lib/python3.8/site-packages/sphinx/util/template.py", line 22, in<module>
from sphinx.jinja2glue import SphinxFileSystemLoader
File "/Users/mvadari/Documents/folder/.venv/lib/python3.8/site-packages/sphinx/jinja2glue.py", line 15, in<module>
from jinja2 import BaseLoader, FileSystemLoader, TemplateNotFound, contextfunction
ImportError: cannot import name 'contextfunction' from 'jinja2' (/Users/mvadari/Documents/sidechain-launch-kit/.venv/lib/python3.8/site-packages/jinja2/__init__.py)
How to Reproduce
Upgrade Jinja2 to 3.1.1, and attempt to run sphinx-apidoc.
Expected behavior
I expected the Sphinx .rst docs to generate properly, but instead there was an error.
Your project
I'm still setting up Sphinx
Screenshots
No response
OS
Mac
Python version
3.8.0
Sphinx version
3.1.1
Sphinx extensions
No response
Extra tools
Poetry v1.1.11
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm trying to set up Sphinx in a new repo and I'm running into an error with Jinja2. It errors when I use Jinja2 v3.1.1, but is fine with v3.0.3.
How to Reproduce
Upgrade Jinja2 to 3.1.1, and attempt to run
sphinx-apidoc
.Expected behavior
I expected the Sphinx .rst docs to generate properly, but instead there was an error.
Your project
I'm still setting up Sphinx
Screenshots
No response
OS
Mac
Python version
3.8.0
Sphinx version
3.1.1
Sphinx extensions
No response
Extra tools
Poetry v1.1.11
Additional context
No response
The text was updated successfully, but these errors were encountered: