Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. Traceback (most recent call last):
  2. File "/opt/python/iopipe/agent.py", line 152, in wrapped
  3. result = func(event, context)
  4. File "/opt/python/iopipe/handler.py", line 12, in wrapper
  5. return get_wrapped_handler()(event, context)
  6. File "/var/task/function.py", line 141, in handler
  7. i = d.read()
  8. File "/var/runtime/botocore/response.py", line 82, in read
  9. self._verify_content_length()
  10. File "/var/runtime/botocore/response.py", line 134, in _verify_content_length
  11. expected_bytes=int(self._content_length))
  12. botocore.exceptions.IncompleteReadError: 0 read, but total bytes expected is 36678.
  13.  
  14. client = boto3.client('s3')
  15. get_json_file = client.get_object(
  16. Bucket=os.environ['S3_BUCKET'],
  17. Key="{0}".format(file_name),
  18. )
  19.  
  20. d = get_json_file.get('Body')
  21. i = d.read()
  22. data = json.loads(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement