ahmdrz / facedetector

A Simple Flask and docker-ready application that works as a server to detect faces, genders and their landmarks.
MIT License
17 stars 12 forks source link

internal error occurred in server #1

Closed djabdou50 closed 5 years ago

djabdou50 commented 5 years ago

from docker image i got : {"message":"internal error occurred in server","status":"internal error"}

but when i remove the gender=on and landmarks=on thats work fine

here is the error message from docker console :

ERROR in app: Exception on /detect [GET] Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/app/server.py", line 51, in detect_human_faces image = image_reader.read_url(image_url, width=400) File "/app/face_detection/image_reader.py", line 13, in read_url image = url_to_image(url) File "/usr/local/lib/python2.7/dist-packages/imutils/convenience.py", line 135, in url_to_image resp = urlopen(url) File "/usr/lib/python2.7/urllib.py", line 87, in urlopen return opener.open(url) File "/usr/lib/python2.7/urllib.py", line 185, in open fullurl = unwrap(toBytes(fullurl)) File "/usr/lib/python2.7/urllib.py", line 1071, in unwrap url = url.strip()

ahmdrz commented 5 years ago

Hi @djabdou50. Thank you for your report. I will check it ASAP.

ahmdrz commented 5 years ago

Can you show me what request you sent to it? Like: localhost:5000/detect?gender=on&landmarks=on&url=https://pixel.nymag.com/imgs/daily/vulture/2018/09/04/04-eminem-2.w700.h700.jpg

djabdou50 commented 5 years ago

hi @ahmdrz problem solved when i access it from browser, apparently the curl was malformed

thank you !

ahmdrz commented 5 years ago

If you got any problem, here you can tell me. Good luck.