Comments (5)
Indeed, and werkzeug
should always be included in the deployment zip package, as per https://github.com/logandk/serverless-wsgi/blob/master/requirements.txt.
Are you getting this error after deploying to Lambda or when invoking sls wsgi serve
?
from serverless-wsgi.
My use case might be an outlier. I was trying out serverless-python-requirements
w/ the docker option because i have c-compiled extensions (psycopg2) that I want to deploy as well. I disabled this project's pack requirements option.
So since i didn't have werkzeug in my project requirements, it was never packaged.
from serverless-wsgi.
Ok, that makes sense. Compiled extensions is a problem with this plugin, one option would be to skip requirement packaging entirely and leave that to serverless-python-requirements
which has a nice solution using Docker. I do like the idea of being able to include a single plugin for a simple flask app with no extensions, though. I will close this issue and continue to consider whether to drop requirement packaging, or at least provide some additional notes in the README. Thanks for reporting.
from serverless-wsgi.
I have the same case. I've disabled serverless-wsgi
's requirements packaging and serverless-python-requirements
is doing its job just fine (I checked the .requirements
folder), but as above, I'm using Django, so I don't need werkzeug
.
@logandk maybe I misread your response - I thought you were saying that it should work if I disable serverless-wsgi
's requirements packaging? But it looks like wsgi.py
imports werkzeug
unconditionally.
I guess then the workaround is to install werkzeug
even though I'm not using it directly?
from serverless-wsgi.
@brettdh Maybe that wasn't clear, you may disable the requirements packaging, but you will then need to add the werkzeug
requirement yourself.
The WSGI wrapper that's included in this plugin relies on werkzeug
for a number of things (handling headers, encodings etc.) - considering that werkzeug
is a fairly lightweight dependency, I think it's the best option for serverless-wsgi
rather than reimplementing those utilities inside the plugin. But I'm open to discussion on alternative approaches.
For now, I would recommend adding werkzeug
for the single purpose of APIGW/WSGI mapping.
from serverless-wsgi.
Related Issues (20)
- Schedule django management command HOT 1
- Missing packages for non-wsgi functions
- Error: ENOTDIR: not a directory, scandir `..../..../distutils-precedence.pth` HOT 1
- Feature: Lambda Powertools HOT 1
- How do you have two entry points, one for JWT and one for non-JWT authorized WSGI handlers?
- Error: ENOTDIR: not a directory HOT 2
- Serverless wsgi application and aws http api fail to integrate HOT 1
- empty header in event HOT 1
- Any reason why we are raising an exception here?
- Cannot deploy Hello World
- Unable to link dependency 'click' because a file by the same name exists in this service
- Attempting to run sls wsgi serve locally is freezing
- -c no longer works but --command does HOT 1
- Question: http/1.1 chunked transfer encoding
- hasbin dependency
- tag 3.0.1 does not contain some fixes from master. HOT 2
- Response contain status code and headers HOT 2
- I got error when I deploy Flask app on AWS lambda HOT 1
- AWS Custom Authorizer via django (drf)
- Provide function to execute when calling sls wsgi command
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-wsgi.