watson-developer-cloud / python-sdk

:snake: Client library to use the IBM Watson services in Python and available in pip as watson-developer-cloud
https://pypi.org/project/ibm-watson/
Apache License 2.0
1.45k stars 828 forks source link

Intermittent problem when using http sync transcription API #815

Closed johann-petrak closed 8 months ago

johann-petrak commented 2 years ago

Using Python package version 5.3.1 with Python 3.8.12

I running a number of transcriptions and did get the following exception for a few of them. Running the exactly same thing again worked. This should not happen, if there is a problem a known/predictable exception should get raised.

Traceback (most recent call last):
  File "./python/audio2txt.py", line 144, in <module>
    resp = speech_to_text.recognize(
  File "/home/johann/anaconda3/envs/asr-ibm/lib/python3.8/site-packages/ibm_watson/speech_to_text_v1.py", line 566, in recognize
    response = self.send(request, **kwargs)
  File "/home/johann/anaconda3/envs/asr-ibm/lib/python3.8/site-packages/ibm_cloud_sdk_core/base_service.py", line 300, in send
    response = self.http_client.request(**request,
  File "/home/johann/anaconda3/envs/asr-ibm/lib/python3.8/site-packages/requests/sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/johann/anaconda3/envs/asr-ibm/lib/python3.8/site-packages/requests/sessions.py", line 687, in send
    r.content
  File "/home/johann/anaconda3/envs/asr-ibm/lib/python3.8/site-packages/requests/models.py", line 838, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "/home/johann/anaconda3/envs/asr-ibm/lib/python3.8/site-packages/requests/models.py", line 763, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

apaparazzi0329 commented 8 months ago

Closing this issue due to its age and inability to reproduce. If this is still an issue, please try again with the latest version of the python-sdk and reopen this issue.