Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When passing a file that does not exist to /predict service, I get an error unrelated to file not existing #855

Open
dgtlmoon opened this issue Oct 3, 2020 · 2 comments

Comments

@dgtlmoon
Copy link
Contributor

dgtlmoon commented Oct 3, 2020

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"
  }
}
@beniz
Copy link
Collaborator

beniz commented Oct 5, 2020

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
Copy link
Contributor Author

I wonder if it says 0, or False? ie filesize === false or filesize === 0 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants