mikeboers / Flask-Images

On-demand resizing of images for Flask applications.
https://mikeboers.github.io/Flask-Images/
BSD 3-Clause "New" or "Revised" License
81 stars 43 forks source link

Compatibility with itsdangerous 2.0.0 #57

Open jllopezpino opened 3 years ago

jllopezpino commented 3 years ago

Flask-Images is not compatible with itsdangerous Version 2.0.0: https://itsdangerous.palletsprojects.com/en/2.0.x/changes/ I got this error when I tried to run my flask app:

Error: While importing 'app', an ImportError was raised:

Traceback (most recent call last):
File "/home/rof/.pyenv/versions/3.7/lib/python3.7/site-packages/flask_images/core.py", line 31, in <module>
from itsdangerous import Signer, constant_time_compare
ImportError: cannot import name 'constant_time_compare' from 'itsdangerous' (/home/rof/.pyenv/versions/3.7/lib/python3.7/site-packages/itsdangerous/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/rof/.pyenv/versions/3.7/lib/python3.7/site-packages/flask/cli.py", line 256, in locate_app
__import__(module_name)
File "/home/rof/src/github.com/shuttle99ou/misolvencia/app.py", line 7, in <module>
from domain_dispatcher import DomainsDispatcher
File "/home/rof/src/github.com/shuttle99ou/misolvencia/domain_dispatcher.py", line 2, in <module>
from MiSolvenciaApp.url_redirect import url_redirect, update_redirect_cache
File "/home/rof/src/github.com/shuttle99ou/misolvencia/MiSolvenciaApp/__init__.py", line 6, in <module>
from MiSolvenciaApp.utils.flask_image_resizer import Images
File "/home/rof/src/github.com/shuttle99ou/misolvencia/MiSolvenciaApp/utils/flask_image_resizer.py", line 4, in <module>
from flask_images import Images as FlaskImages
File "/home/rof/.pyenv/versions/3.7/lib/python3.7/site-packages/flask_images/__init__.py", line 1, in <module>
from .core import Images, resized_img_src, resized_img_size, resized_img_attrs, resized_img_tag
File "/home/rof/.pyenv/versions/3.7/lib/python3.7/site-packages/flask_images/core.py", line 34, in <module>
from itsdangerous._compat import constant_time_compare
ModuleNotFoundError: No module named 'itsdangerous._compat'
heinGertenbach commented 1 year ago

What is the temporary solution for fixing this problem?

jllopezpino commented 1 year ago

What is the temporary solution for fixing this problem?

Feel free to try our fork https://github.com/shuttle99ou/Flask-Image-Resizer https://pypi.org/project/Flask-Image-Resizer/