解决:flask文件中 from werkzeug import secure_filename,FileStorage 报错cannot import name ‘FileStorage‘

如果出现cannot import secure_filename把from werkzeug 改为from werkzeug.utils即可
如果改完出现cannot import name ‘FileStorage’
将其分两行写:
from werkzeug.utils import secure_filename
from werkzeug.datastructures import FileStorage

FileStorage在werkzeug.datastructures 下面

猜你喜欢

转载自blog.csdn.net/u013066730/article/details/108364000