-
-
Notifications
You must be signed in to change notification settings - Fork 431
Unable to unmarshal input: Expecting value: line 1 column 1 (char 0) #208
Comments
If you're not using a bash shell (I see you're on Windows) then you'll need to escape those characters correctly: https://stackoverflow.com/a/15262019/58173 Try |
Thank you for the reply... No luck
Output |
for testing, I used {} and the output was
|
Hi @cadeath did you figure out how to escape quotes correctly in the end? |
Closing due to lack of activity – this is just an issue with ppl figuring out command line usage in Windows, nothing to do with this repository. |
Hello, Sorry for being in active for a while, I just tried an alternative.
|
I had the same trouble.. Try this: |
I was tryin use this https://github.com/philschmid/serverless-bert-huggingface-aws-lambda-docker, got same error. body = event['body'] works fine! |
Hello Guys,
I just want to ask on how to test my Lambda function with an json input?
When I tested it without parameter (json input)
docker run --rm -v %cd%:/var/task lambci/lambda:python3.6
it succeed
but when these commands
output
{"errorMessage": "Bad handler ''{msg:hello}''"}
and this
docker run --rm -v %cd%:/var/task lambci/lambda:python3.6 lambda_function.lambda_handler '{"msg":"hello"}'
output
{"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/decoder.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"]]}
My codes are
Windows 10
Docker 2.1.0.1 (37199)
The text was updated successfully, but these errors were encountered: