HumeAI/hume-python-sdk

Could not parse response into BatchJobResult

Closed this issue · 2 comments

I copied your sample code to use the batch API.

I get the following error while using the job.await_complete() method.

Exception has occurred: HumeClientException
Could not parse response into BatchJobResult: {"job_id": "23834180-3d0e-4eb2-9913-99abc1f48cd2", "request": {"callback_url": null, "files": [], "models": {"burst": null, "face": {"descriptions": null, "facs": null, "fps_pred": 3.0, "identify_faces": true, "min_face_size": 60, "prob_threshold": 0.99, "save_faces": false}, "facemesh": null, "language": null, "ner": null, "prosody": null}, "notify": false, "urls": ["https://tinyurl.com/hume-img"]}, "state": {"created_timestamp_ms": 1682984712107, "ended_timestamp_ms": 1682984714480, "num_errors": 0, "num_predictions": 1, "started_timestamp_ms": 1682984712172, "status": "COMPLETED"}, "user_id": "373da3c2-a422-43fd-8192-7ddf08a05b64"}
TypeError: 'NoneType' object is not iterable

The above exception was the direct cause of the following exception:

File "C:\Users\anoop\OneDrive\Documents\GitHub\RnDKagami\faceCoding.py", line 9, in
x = client.get_job_result("23834180-3d0e-4eb2-9913-99abc1f48cd2")
hume.error.hume_client_exception.HumeClientException: Could not parse response into BatchJobResult: {"job_id": "23834180-3d0e-4eb2-9913-99abc1f48cd2", "request": {"callback_url": null, "files": [], "models": {"burst": null, "face": {"descriptions": null, "facs": null, "fps_pred": 3.0, "identify_faces": true, "min_face_size": 60, "prob_threshold": 0.99, "save_faces": false}, "facemesh": null, "language": null, "ner": null, "prosody": null}, "notify": false, "urls": ["https://tinyurl.com/hume-img"]}, "state": {"created_timestamp_ms": 1682984712107, "ended_timestamp_ms": 1682984714480, "num_errors": 0, "num_predictions": 1, "started_timestamp_ms": 1682984712172, "status": "COMPLETED"}, "user_id": "373da3c2-a422-43fd-8192-7ddf08a05b64"}

Hi @anoopkgeo, thanks for being part of our beta. We had a large release today that adds highly requested functionality to our batch API. The release was not backwards compatible, so you'll need to upgrade to the latest version of our SDK, version 0.3.0.

We've put together a full description of the changes and new features here: https://help.hume.ai/developers/whats-new/release-may-2023. Some of these new features are available in the Python SDK now and some will be added over the coming weeks.

If you come across any issues when trying the new version of the SDK feel free to respond here or reach out directly to our support team at support@hume.ai.

thank you. Will check it out later today and let you know if I run in to anything new.