aws-samples / aws-serverless-samfarm

This repo is full CI/CD Serverless example which was used in the What's New with AWS Lambda presentation at Re:Invent 2016.
Apache License 2.0
284 stars 240 forks source link

Python Error #7

Open andrew-dixon opened 6 years ago

andrew-dixon commented 6 years ago

I've tried everything I can think of to get this example working using sam-cli but with no luck. I've completely removed Python and reinstalled it, using brew, both 2.7 and 3.7 but I'm still getting the following error:

START RequestId: 13841483-602f-1dff-bbbb-f96607fd8ff5 Version: $LATEST
2018-07-23T23:48:13.559Z        13841483-602f-1dff-bbbb-f96607fd8ff5    Lambda is 1357 days old!
2018-07-23T23:48:13.560Z        13841483-602f-1dff-bbbb-f96607fd8ff5    The number of SAMs to show: 1
2018-07-23T23:48:13.561Z        13841483-602f-1dff-bbbb-f96607fd8ff5    Multiplier to apply to SAMs: 1
2018-07-23T23:48:13.561Z        13841483-602f-1dff-bbbb-f96607fd8ff5    Total number of SAMs to show: 1
END RequestId: 13841483-602f-1dff-bbbb-f96607fd8ff5
REPORT RequestId: 13841483-602f-1dff-bbbb-f96607fd8ff5  Duration: 45.22 ms      Billed Duration: 100 ms Memory Size: 128 MB     Max Memory Used: 24 MB
2018-07-24 00:48:12 No Content-Type given. Defaulting to 'application/json'.
2018-07-24 00:48:12 127.0.0.1 - - [24/Jul/2018 00:48:12] "GET /sam HTTP/1.1" 500 -
2018-07-24 00:48:12 Error on request:
Traceback (most recent call last):
  File "/Users/andrew/Library/Python/3.7/lib/python/site-packages/werkzeug/serving.py", line 270, in run_wsgi
    execute(self.server.app)
  File "/Users/andrew/Library/Python/3.7/lib/python/site-packages/werkzeug/serving.py", line 260, in execute
    for data in application_iter:
  File "/Users/andrew/Library/Python/3.7/lib/python/site-packages/werkzeug/wsgi.py", line 870, in __next__
    return self._next()
  File "/Users/andrew/Library/Python/3.7/lib/python/site-packages/werkzeug/wrappers.py", line 82, in _iter_encoded
    for item in iterable:
TypeError: 'int' object is not iterable

I've deleted and reinstalled everything in the "/Library/Python/" directory as well, but still, the error persists.

I'm running the following command from the API directory and them calling http://127.0.0.1:3000/sam from the browser.

This is on macOS 10.13.6