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

module 'jinja2.utils' has no attribute 'escape' #10289

Closed
rathishcholarajan opened this issue Mar 24, 2022 · 5 comments
Closed

module 'jinja2.utils' has no attribute 'escape' #10289

rathishcholarajan opened this issue Mar 24, 2022 · 5 comments
Labels

Comments

@rathishcholarajan
Copy link

Describe the bug

Getting this error in our builds since the latest release 3.1.0 of Jinja2.

module 'jinja2.utils' has no attribute 'escape'

How to Reproduce

https://github.com/Qiskit/qiskit-ibm-runtime/runs/5677789048?check_suite_focus=true#step:5:683

Expected behavior

Builds shouldn't fail.

Your project

https://github.com/Qiskit/qiskit-ibm-runtime/runs/5677789048?check_suite_focus=true#step:5:683

Screenshots

No response

OS

Mac

Python version

3.9

Sphinx version

4.4.0

Sphinx extensions

No response

Extra tools

No response

Additional context

No response

@aiwalter
Copy link

aiwalter commented Mar 24, 2022

Having same issue, seems today released jinja2 is causing the issue, there is also an issue open: pallets/jinja#1626

@davidism
Copy link

Jinja2 itself uses Sphinx, and does not have this issue building its docs. Sphinx does not appear to import escape from Jinja2 (or MarkupSafe). Perhaps another extension or library you are using does? You may be able to turn on more verbose output from sphinx-build to see the full traceback and identify what is doing the import.

@aiwalter
Copy link

yes the issue comes actually from nbconvert, sry for confusion. I opened an issue there:
jupyter/nbconvert#1736

@rathishcholarajan
Copy link
Author

Thanks @davidism @aiwalter. We are using nbconvert as well and looks like that's the issue.

pramodk pushed a commit to neuronsimulator/nrn that referenced this issue Mar 24, 2022
* module 'jinja2.utils' has no attribute 'escape' sphinx-doc/sphinx#10289
* [BUG] module 'jinja2.utils' has no attribute 'escape' jupyter/nbconvert#1736
alexsavulescu pushed a commit to neuronsimulator/nrn that referenced this issue Mar 25, 2022
* module 'jinja2.utils' has no attribute 'escape' sphinx-doc/sphinx#10289
* [BUG] module 'jinja2.utils' has no attribute 'escape' jupyter/nbconvert#1736
@mjmeijer
Copy link

When the cause is hidden somewhere in your dependency tree, as in my Flask app, you can workaround for the moment by adding explicit dependecy to your requirements.txt

jinja2==3.0.3

pramodk pushed a commit to neuronsimulator/nrn that referenced this issue Mar 25, 2022
* module 'jinja2.utils' has no attribute 'escape' sphinx-doc/sphinx#10289
* [BUG] module 'jinja2.utils' has no attribute 'escape' jupyter/nbconvert#1736
MagikEh added a commit to MetPX/sarracenia that referenced this issue Mar 25, 2022
ghPages Action was failing with `'jinja2.utils' has no attribute 'escape'` which appears to be due to a recent update.
Following recommended action of forcing requirement to the previous version.

As per: sphinx-doc/sphinx#10289 (comment)
tohtsky added a commit to tohtsky/irspack that referenced this issue Mar 26, 2022
tbelaire added a commit to tbelaire/pikaraoke that referenced this issue Apr 16, 2022
This also pins the jinja2 version to 3.0.3 as there is an ongoing issue
with pybabel: sphinx-doc/sphinx#10289
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants