New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError When Invoking Python (serverless v5.5.0) #723
Comments
Hello @paulcruseSG |
Fixed in v5.5.1 |
@dherault This is a python based lambda using a function decorator: This is the file being invoked: @apigateway_handler()
def handle(client):
client.response_body = hello_word(client.request_body) This is the decorator code: def apigateway_handler(**kwargs):
def decorator_func(func):
def wrapper(event, context):
client = ApiGatewayFramework(event, **kwargs)
if client.validate_request_and_permissions(**kwargs):
func(client)
return client.response
return wrapper
return decorator_func And this is what @property
def response(self):
return {
'headers': self.response_headers,
'statusCode': self.response_code, # response_code defaults to 200 when not explicitly set
'body': self.response_body
} But thanks for working on a fix so fast... |
@paulcruseSG did v5.5.1 fix your issue? |
I think not |
@paulcruseSG I just reverted a commit which broke the functionality. should be fixed with the next release. (note: there still seems to be a timeout issue.) from npm: I fairly safe version to use should be v5.4.2 (until master is released) |
v5.6.1 |
@dherault @dnalborczyk Thanks for the quick response and fix; was away for July 4th and come back to see a fix. Will give this a look later today, but either way thanks for the fix |
Installing python-dev package fixed this for me. |
Trying to invoke a python lambda function, get this error:
This my yaml file set-up:
The text was updated successfully, but these errors were encountered: