twitter api ("Connection broken: Invalid Chunk Length(got length b'', 0 bytes read)" code example
Example 1: twitter api ("Connection broken: Invalid Chunk Length(got length b'', 0 bytes read)"
r = ''
while r == '':
try:
r = requests.get(Url, headers = headers)
except (requests.exceptions.ConnectionError, requests.exceptions.ChunkedEncodingError) as err:
log_(err + ' Put to sleep before retrying.')
time.sleep(100)
continue
Example 2: twitter api ("Connection broken: Invalid Chunk Length(got length b'', 0 bytes read)"
with requests.get('http://httpbin.org/get', stream=True) as r:
Example 3: twitter api ("Connection broken: Invalid Chunk Length(got length b'', 0 bytes read)"
with requests.request("POST", url_base, json=task, headers=headers) as report:
print('report: ', report)