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

Run phraseanet-docs docker fail: ImportError: phraseanet-doc-builder_1 | ImportError: cannot import name 'environmentfilter' from 'jinja2' (/usr/local/lib/python3.8/dist-packages/jinja2/__init__.py) #341

Open
GauthierGitHub opened this issue Jun 30, 2022 · 0 comments

Comments

@GauthierGitHub
Copy link

GauthierGitHub commented Jun 30, 2022

Error on first run

phraseanet-doc-builder_1 | from sphinx.io import read_doc
phraseanet-doc-builder_1 | File "/usr/local/lib/python3.8/dist-packages/sphinx/io.py", line 42, in <module>
phraseanet-doc-builder_1 | from sphinx.util.rst import append_epilog, docinfo_re, prepend_prolog
phraseanet-doc-builder_1 | File "/usr/local/lib/python3.8/dist-packages/sphinx/util/rst.py", line 22, in <module>
phraseanet-doc-builder_1 | from jinja2 import environmentfilter
phraseanet-doc-builder_1 | ImportError: cannot import name 'environmentfilter' from 'jinja2' (/usr/local/lib/python3.8/dist-packages/jinja2/__init__.py)
phraseanet-doc-builder_1 | make[1]: *** [Makefile:47: html] Error 1
phraseanet-doc-builder_1 | make[1]: Leaving directory '/docs/fr'
phraseanet-doc-builder_1 | make: *** [Makefile:45: html-fr] Error 2

Resolution

According to sphinx-doc/sphinx#10291
On Dockerfile replace
&& python3 -m pip install Sphinx==2.4.4 Pillow \
by
&& python3 -m pip install Sphinx==4.3.1 Pillow \

GauthierGitHub pushed a commit to GauthierGitHub/Phraseanet-Docs that referenced this issue Jul 4, 2022
GauthierGitHub pushed a commit to GauthierGitHub/Phraseanet-Docs that referenced this issue Jul 4, 2022
GauthierGitHub pushed a commit to GauthierGitHub/Phraseanet-Docs that referenced this issue Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant