{"action":"opened","issue":{"url":"https://api.github.com/repos/lambci/docker-lambda/issues/100","repository_url":"https://api.github.com/repos/lambci/docker-lambda","labels_url":"https://api.github.com/repos/lambci/docker-lambda/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/lambci/docker-lambda/issues/100/comments","events_url":"https://api.github.com/repos/lambci/docker-lambda/issues/100/events","html_url":"https://github.com/lambci/docker-lambda/issues/100","id":334632073,"node_id":"MDU6SXNzdWUzMzQ2MzIwNzM=","number":100,"title":"JSONDecodeError when providing event body python3.6","user":{"login":"spyoungtech","id":15212758,"node_id":"MDQ6VXNlcjE1MjEyNzU4","avatar_url":"https://avatars2.githubusercontent.com/u/15212758?v=4","gravatar_id":"","url":"https://api.github.com/users/spyoungtech","html_url":"https://github.com/spyoungtech","followers_url":"https://api.github.com/users/spyoungtech/followers","following_url":"https://api.github.com/users/spyoungtech/following{/other_user}","gists_url":"https://api.github.com/users/spyoungtech/gists{/gist_id}","starred_url":"https://api.github.com/users/spyoungtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spyoungtech/subscriptions","organizations_url":"https://api.github.com/users/spyoungtech/orgs","repos_url":"https://api.github.com/users/spyoungtech/repos","events_url":"https://api.github.com/users/spyoungtech/events{/privacy}","received_events_url":"https://api.github.com/users/spyoungtech/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-21T19:46:59Z","updated_at":"2018-06-21T19:46:59Z","closed_at":null,"author_association":"NONE","body":"The command\r\n```\r\ndocker run -v ${PWD}:/var/task --rm lambci/lambda:python3.6 lambda_function.lambda_handler '{\"foo\": \"bar\"}'\r\n```\r\n\r\nProduces the following error:\r\n\r\n```\r\nSTART RequestId: 72011235-1b83-4b03-af02-e83c0806b3c4 Version: $LATEST\r\nUnable to parse input as json: Expecting value: line 1 column 1 (char 0)\r\nTraceback (most recent call last):\r\n  File \"/var/lang/lib/python3.6/json/__init__.py\", line 354, in loads\r\n    return _default_decoder.decode(s)\r\n  File \"/var/lang/lib/python3.6/json/decoder.py\", line 339, in decode\r\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\r\n  File \"/var/lang/lib/python3.6/json/decoder.py\", line 357, in raw_decode\r\n    raise JSONDecodeError(\"Expecting value\", s, err.value) from None\r\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\r\n\r\nEND RequestId: 72011235-1b83-4b03-af02-e83c0806b3c4\r\nREPORT RequestId: 72011235-1b83-4b03-af02-e83c0806b3c4 Duration: 15 ms Billed Duration: 100 ms Memory Size: 1536 MB Max Memory Used: 19 MB\r\n\r\n{\"errorMessage\": \"Expecting value: line 1 column 1 (char 0)\", \"errorType\": \"JSONDecodeError\", \"stackTrace\": [[\"/var/lang/lib/python3.6/json/__init__.py\", 354, \"loads\", \"return _default_decoder.decode(s)\"], [\"/var/lang/lib/python3.6/json/\r\ndecoder.py\", 339, \"decode\", \"obj, end = self.raw_decode(s, idx=_w(s, 0).end())\"], [\"/var/lang/lib/python3.6/json/decoder.py\", 357, \"raw_decode\", \"raise JSONDecodeError(\\\"Expecting value\\\", s, err.value) from None\"]]}\r\n```\r\nI also tried using the environment variable with the `-e` option with the same result\r\nPossibly a windows specific issue. I've also tried using a powershell script that loads a string from a json file like\r\n\r\n```\r\n$EVENT_BODY = Get-Content .\\test_event.json -Raw\r\ndocker run -v ${PWD}:/var/task --rm lambci/lambda:python3.6 lambda_function.lambda_handler $EVENT_BODY\r\n```\r\nSame result.\r\n\r\nHowever, if I write the event body like so `\"{\\\"foo\\\": \\\"bar\\\"}\"`, that works fine. "}}
{"actor":{"display_login":"spyoungtech"}}