flask-multiple-file-upload icon indicating copy to clipboard operation
flask-multiple-file-upload copied to clipboard

ImportError: cannot import name 'secure_filename' from 'werkzeug'

Open manuel-masiello opened this issue 2 months ago • 0 comments

Good morning.

Thank you for this example code, however I have errors that I cannot correct :

$ conda create --name test-libs $ conda activate test-libs $ conda install pip $ pip install flask flask-uploads flask-dropzone $ export FLASK_APP=app.py $ flask run

Usage: flask run [OPTIONS] Try 'flask run --help' for help.

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

Traceback (most recent call last): File "/home/manuel/anaconda3/envs/test-libs/lib/python3.13/site-packages/flask/cli.py", line 245, in locate_app import(module_name) ~~~~~~~~~~^^^^^^^^^^^^^ File "/home/manuel/projets/flask-multiple-file-upload/app.py", line 3, in from flask_uploads import UploadSet, configure_uploads, IMAGES, patch_request_class File "/home/manuel/anaconda3/envs/test-libs/lib/python3.13/site-packages/flask_uploads.py", line 26, in from werkzeug import secure_filename, FileStorage ImportError: cannot import name 'secure_filename' from 'werkzeug' (/home/manuel/anaconda3/envs/test-libs/lib/python3.13/site-packages/werkzeug/init.py)

manuel-masiello avatar Dec 04 '24 10:12 manuel-masiello