Post

2 followers Follow
0

getImage returns error 500

Gareth Evans-Mcclave
Apr 29, 14:50
Hi
I am managing to attach to the camera, start the session and initiate the picture taking.
I then use "status" to wait until "done".
Once done I call "getImage" using the fileURI returned. This always fails with a 500 error.
The JSON commands are:

{ "name" : "camera.startSession" }
<<{
"name": "camera.startSession",
"state": "done",
"results": {
"sessionId": "1",
"timeout": 300
}
}
{ "name" : "camera.takePicture", "parameters": { "sessionId": 1 } }
<<{
"name": "camera.takePicture",
"state": "inProgress",
"progress": {
"completion": 0
},
"id": "20160429-101623"
}
... status calls omitted for clarity
<<{
"name": "camera.takePicture",
"state": "done",
"results": {
"fileUri": "20160429-101623"
}
}
{ "name" : "camera.getImage", "parameters": { "fileUri": "20160429-101623" } }
Returns error 500
Any idea what I am missing?

Please sign in to leave a comment.

2 comments

0

For all error cases, the response include a json body in the format
{
"name": "camera.info",
"state": "error",
"error": {
"code": "serverError",
"message": "cannot get camera info."
}
}

The message returned should help you find the cause of the problem.

0 votes