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

api request error #1003

Closed
Croie opened this issue Feb 4, 2024 · 3 comments
Closed

api request error #1003

Croie opened this issue Feb 4, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Croie
Copy link

Croie commented Feb 4, 2024

the request parameter is a base64 image:

[2024-02-04 13:59:24,982] ERROR in app: Exception on /analyze [POST]
Traceback (most recent call last):
File "/home/andy/deepface/.venv/lib/python3.10/site-packages/flask/app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
File "/home/andy/deepface/.venv/lib/python3.10/site-packages/flask/app.py", line 873, in full_dispatch_request
return self.finalize_request(rv)
File "/home/andy/deepface/.venv/lib/python3.10/site-packages/flask/app.py", line 892, in finalize_request
response = self.make_response(rv)
File "/home/andy/deepface/.venv/lib/python3.10/site-packages/flask/app.py", line 1183, in make_response
rv = self.json.response(rv)
File "/home/andy/deepface/.venv/lib/python3.10/site-packages/flask/json/provider.py", line 214, in response
f"{self.dumps(obj, **dump_args)}\n", mimetype=self.mimetype
File "/home/andy/deepface/.venv/lib/python3.10/site-packages/flask/json/provider.py", line 179, in dumps
return json.dumps(obj, **kwargs)
File "/usr/lib/python3.10/json/init.py", line 238, in dumps
**kw).encode(obj)
File "/usr/lib/python3.10/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.10/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/home/andy/deepface/.venv/lib/python3.10/site-packages/flask/json/provider.py", line 121, in _default
raise TypeError(f"Object of type {type(o).name} is not JSON serializable")
TypeError: Object of type int32 is not JSON serializable

What needs to be modified?

@serengil serengil added the bug Something isn't working label Feb 4, 2024
@serengil
Copy link
Owner

serengil commented Feb 4, 2024

I am currently working on this bug, will be sorted soon

@serengil
Copy link
Owner

serengil commented Feb 4, 2024

Closed with PR - #1004

@serengil serengil closed this as completed Feb 4, 2024
@serengil
Copy link
Owner

serengil commented Feb 4, 2024

This change is not published in pip yet. You can use source code instead of pip package until a new release published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants