Serverless-offline: Version 5.6.0 is not working properly with Python

Created on 4 Jul 2019  路  5Comments  路  Source: dherault/serverless-offline

After updating to version 5.6.0 of serverless-offline it loads correctly my functions paths (rest api handlers), but when I invoke them (through Postman) the actual handlers are never invoked, it just returns 200 and null as the response body.

We downgraded to a previous version and it works well again.

Here is the serverless.yml file for the test:

service: test

#frameworkVersion: ">=1.1.0 <2.0.0"
provider:
  name: aws
  runtime: python3.6
functions:
  ola:
    handler: todos/list.list
    events:
      - http:
          path: ola
          method: get
plugins:
  - serverless-offline

And here is the handler code (python):

import json

def list(event, context):
    response = {
        "statusCode": 200,
        "body": json.dumps('Was ist passiert?')
    }
    return response
bug python

All 5 comments

thanks @Rafaelsk ! I guess we missed to test python 馃槙

@dnalborczyk I'm glad to know I could help.

@Rafaelsk I was under the assumption that v5.6.0 broke your environment, but it seems this bug has been lingering around for a while.

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

@dnalborczyk Alright. Thanks. I'll try again on the next version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FranzSkuffka picture FranzSkuffka  路  3Comments

mattmeye picture mattmeye  路  4Comments

ghost picture ghost  路  4Comments

Ali-Dalal picture Ali-Dalal  路  4Comments

yareyaredesuyo picture yareyaredesuyo  路  4Comments