When passing a file that does not exist to /predict service, I get an error unrelated to file not existing
dgtlmoon opened this issue · comments
dgtlmoon commented
For example, /xxxxxx.jpg
really does not exist, I would expect a message like "unable to open file" or similar, but I get an error about the size of the file.
(tested on sha256:f84101fe0b38128ed5673621ecfb7c6476921ffbdabcee38477473993520bc50 jolibrain/deepdetect_cpu)
{
"data": [
"/xxxxxxx.jpg"
],
"parameters": {
"input": {
"height": 300,
"width": 300
},
"mllib": {
"gpu": false
},
"output": {
"bbox": true,
"confidence_threshold": 0.2
}
},
"service": "mydetection"
}
{
"status": {
"code": 400,
"dd_code": 1005,
"dd_msg": "Service Input Error: /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/imgproc/src/imgwarp.cpp:3492: error: (-215) ssize.width > 0 && ssize.height > 0 in function resize\n",
"msg": "BadRequest"
}
}
Emmanuel Benazera commented
This is OpenCV saying the image is of size 0. Not too easy to replace with a better error in our case since image reading is multithreaded, but we could.
dgtlmoon commented
I wonder if it says 0, or False? ie filesize === false
or filesize === 0
?