Itsdangerous is a very common and popular package used for serialization in other packages and apps.
One of the errors that one may face is the import error due to either the version of flask you are using or the version of itsdangerous being used. Let us explore the issue first and then some of the solutions
In our case we are using itsdangerous for our login section of our app for reset. The following error may show when you try
to run your app “ImportError: cannot import name ‘TimedJSONWebSignatureSerializer’ from ‘itsdangerous'”
How to Fix it
- Method 1: Update Flask to newer version 2.x : pip install flask –upgrade
- Method 2: Downgrade itsdangerous to 2.01
- Method 3: Downgrade itsdangerous and install email_validator
This will fix it but you will see an email validator error so you will have to install email_validator package and then the issue will be fixed.
pip install itsdangerous==2.0.1 pip install email_validator
I hope this fixes the issue for you. Happy Coding
Jesus Saves
By Jesse E.Agbe(JCharis)