Incompatible with newly released Werkzeug 1.0.0
See original GitHub issueContext
After a new today’s deployment app didn’t work.
Expected Behavior
Work.
Actual Behavior
Getting exception after deployment:
[ERROR] ImportError: cannot import name 'secure_filename' from 'werkzeug' (/var/task/werkzeug/__init__.py)
Traceback (most recent call last):
File "/var/task/handler.py", line 602, in lambda_handler
return LambdaHandler.lambda_handler(event, context)
File "/var/task/handler.py", line 245, in lambda_handler
handler = cls()
File "/var/task/handler.py", line 139, in __init__
self.app_module = importlib.import_module(self.settings.APP_MODULE)
File "/var/lang/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
Possible Fix
As a workaround here suggested to use older Werkzeug: https://github.com/puckel/docker-airflow/issues/499
werkzeug==0.16.1
Steps to Reproduce
Try to deploy a new app from a clean environment.
Contents of a requirements.txt
:
zappa
flask
Your Environment
- Zappa version used:
zappa==0.50.0
- Operating System and Python version:
Python 3.7.4
- The output of
pip freeze
:
boto3==1.12.4
botocore==1.15.4
certifi==2019.11.28
cfn-flip==1.2.2
chardet==3.0.4
Click==7.0
Flask==1.1.1
Werkzeug==1.0.0
WTForms==2.2.1
zappa==0.50.0
...
- Your
zappa_settings.json
:
prod:
project_name: app-admin
app_function: app_admin.main.app
aws_region: eu-central-1
exclude:
- .env*
- boto3*
- botocore*
keep_warm: true
s3_bucket: my-bucket
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Changelog — Werkzeug Documentation (1.0.x)
Resolved a regression with status code handling in the integrated development server. Version 0.14¶. Released on December 31st 2017. HTTP exceptions are now ......
Read more >Werkzeug - PyPI
Werkzeug is a comprehensive WSGI web application library. It began as a simple collection of various utilities for WSGI applications and has become...
Read more >Armin Ronacher on Twitter: "Raging hard at Werkzeug's ...
Raging hard at Werkzeug's backwards incompatible changes right now. There are so many libraries completely incompatible with Werkzeug 1.0.
Read more >problem with pipenv, flask-uploads, and Werkzeug
They were no release on pypi since 2016, I bet they won't do it (Maybe you can ask for it on the github...
Read more >Changelog — flask-smorest 0.40.0 documentation
Support Blueprint registration with custom names (a feature introduced in Flask 2.0.1) ... Backwards-incompatible: Drop Flask < 2 and Werkzeug < 2 (#243)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This requirement was made explicit with 0.51.0, but I’m keeping this issue open until we update the code to be compatible with werkzeug 1.0.0.
What’s the status of this issue? It seems that Zappa does work with v1 and maybe also v2. Is it just a matter of configuring the CI to test against the newer versions?