• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

362
Views
Python Flask import Error of module that isn´t being imported

I have a flask app running in Google App Engine. Yesterday, I deployed a new version of my app where I only change the HTML style. It deployed as it was supposed to. Today, I realized that I didn't change the title for each corresponding HTML page, so I only changed the title tag in each HTML page. I deployed the app again and now I'm getting this strange error of an Import Error for a module that I have never even used. How can I fix this?

The error:

ImportError: cannot import name 'json' from 'itsdangerous' (/layers/google.python.pip/pip/lib/python3.7/site-packages/itsdangerous/__init__.py)

EDIT FEB 24, 2022:

enter image description here

as you can see, the original folder to python3.7 has been replaced with python3.9

Is this normal in GAE?

over 3 years ago · Santiago Trujillo
4 answers
Answer question

0

This is caused by changes in Flask dependencies. Another question about this was asked on ServerFault.

You can either upgrade to Flask>2, or I had to downgrade to itsdangerous==2.0.1 if you can't do that.

over 3 years ago · Santiago Trujillo Report

0

I had the same issue today. I was using flask=1.1.2, and when I updated the version to flask==2.0.3, the import issue was resolved.

over 3 years ago · Santiago Trujillo Report

0

This issue on Flask's GitHub is related.

Either update to Flask>2, or if that's not possible pin ItsDangerous<2 and MarkupSafe<2.

To pin to lower versions in a requirements.txt file:

flask==1.1.4
itsdangerous==1.1.0
markupsafe==1.1.1
over 3 years ago · Santiago Trujillo Report

0

the deprecation is performed with itsdangerous > 2.0.1.

over 3 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error