replicate/replicate-python

RequestsJSONDecodeError

aaronkao opened this issue · 1 comments

Don't really understand what is throwing this error. Been running through a bunch of these but one specific MP3 file I am transcribing is throwing this error.

 File "/home/kao/.local/lib/python3.8/site-packages/replicate/prediction.py", line 168, in create
    resp = self._client._request(
  File "/home/kao/.local/lib/python3.8/site-packages/replicate/client.py", line 79, in _request
    raise ReplicateError(resp.json()["detail"])
  File "/home/kao/.local/lib/python3.8/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I am running https://replicate.com/openai/whisper/versions/91ee9c0c3df30478510ff8c8a3a545add1ad0259ad3a9f78fba57fbc05ee64f7

Hi @aaronkao. As of version 0.14.0, Replicate is using httpx instead of Requests, which may resolve your issue. Please upgrade your client to the latest version and try again. And if it's still not working for you, let me know and I'll reopen this issue. Thanks!