You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a local fallback for when Elevenlabs should not work, or the Internet would be down, or no connection.
I stumble upon an unhandled exception here:
helpers.py, line 730, in _api_tts_with_concurrency
response_json = e.response.json()
AttributeError: 'NoneType' object has no attribute 'json'
I think it's because there's no response at all from Elevenlabs, since the PC is offline.
This is the function:
def _api_tts_with_concurrency(requestFunction:callable, generationID:str, generationQueue:_PeekQueue) -> requests.Response:
#Just a helper function which does all the concurrency stuff for TTS calls.
waitMultiplier = 1
response = None
try:
response = requestFunction()
response.raise_for_status() #Just in case the callable isn't a function that already does this.
except requests.exceptions.RequestException as e:
response_json = e.response.json()
response_handled = False
Can you fix this in the next version?
You can reproduce the bug by going offline after initialising the lib
Thanks
The text was updated successfully, but these errors were encountered:
Noted, will fix. Library isn't abandoned or anything, just under heavy exam crunch atm. Will pick development back up and update all the stuff that needs updating in the 2nd half of february, probably.
Hi,
I'm working on a local fallback for when Elevenlabs should not work, or the Internet would be down, or no connection.
I stumble upon an unhandled exception here:
helpers.py, line 730, in _api_tts_with_concurrency
response_json = e.response.json()
AttributeError: 'NoneType' object has no attribute 'json'
I think it's because there's no response at all from Elevenlabs, since the PC is offline.
This is the function:
def _api_tts_with_concurrency(requestFunction:callable, generationID:str, generationQueue:_PeekQueue) -> requests.Response:
#Just a helper function which does all the concurrency stuff for TTS calls.
waitMultiplier = 1
response = None
try:
response = requestFunction()
response.raise_for_status() #Just in case the callable isn't a function that already does this.
except requests.exceptions.RequestException as e:
response_json = e.response.json()
response_handled = False
Can you fix this in the next version?
You can reproduce the bug by going offline after initialising the lib
Thanks
The text was updated successfully, but these errors were encountered: