Created
May 11, 2018 00:07
-
-
Save uberscientist/09c93c6a2c193b489a92150fd52ee7d5 to your computer and use it in GitHub Desktop.
Error sporadically occurs during stream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exception in thread Thread-1: | |
Traceback (most recent call last): | |
File "/home/nak/.virtualenvs/tradier-bot/lib/python3.6/site-packages/urllib3/response.py", line 543, in _update_chunk_length | |
self.chunk_left = int(line, 16) | |
ValueError: invalid literal for int() with base 16: b'' | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/home/nak/.virtualenvs/tradier-bot/lib/python3.6/site-packages/urllib3/response.py", line 302, in _error_catcher | |
yield | |
File "/home/nak/.virtualenvs/tradier-bot/lib/python3.6/site-packages/urllib3/response.py", line 598, in read_chunked | |
self._update_chunk_length() | |
File "/home/nak/.virtualenvs/tradier-bot/lib/python3.6/site-packages/urllib3/response.py", line 547, in _update_chunk_length | |
raise httplib.IncompleteRead(line) | |
http.client.IncompleteRead: IncompleteRead(0 bytes read) | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/home/nak/.virtualenvs/tradier-bot/lib/python3.6/site-packages/requests/models.py", line 745, in generate | |
for chunk in self.raw.stream(chunk_size, decode_content=True): | |
File "/home/nak/.virtualenvs/tradier-bot/lib/python3.6/site-packages/urllib3/response.py", line 432, in stream | |
for line in self.read_chunked(amt, decode_content=decode_content): | |
File "/home/nak/.virtualenvs/tradier-bot/lib/python3.6/site-packages/urllib3/response.py", line 626, in read_chunked | |
self._original_response.close() | |
File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__ | |
self.gen.throw(type, value, traceback) | |
File "/home/nak/.virtualenvs/tradier-bot/lib/python3.6/site-packages/urllib3/response.py", line 320, in _error_catcher | |
raise ProtocolError('Connection broken: %r' % e, e) | |
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read)) | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner | |
self.run() | |
File "/usr/lib/python3.6/threading.py", line 864, in run | |
self._target(*self._args, **self._kwargs) | |
File "/home/nak/PycharmProjects/tradier-bot/tradier_api.py", line 70, in sub_loop | |
api_request(msg) | |
File "/home/nak/PycharmProjects/tradier-bot/tradier_api.py", line 37, in api_request | |
get_streamer(msg) | |
File "/home/nak/PycharmProjects/tradier-bot/tradier_api.py", line 61, in get_streamer | |
for line in requests.post(stream_url, params=params, headers=headers, stream=True).iter_lines(): | |
File "/home/nak/.virtualenvs/tradier-bot/lib/python3.6/site-packages/requests/models.py", line 789, in iter_lines | |
for chunk in self.iter_content(chunk_size=chunk_size, decode_unicode=decode_unicode): | |
File "/home/nak/.virtualenvs/tradier-bot/lib/python3.6/site-packages/requests/models.py", line 748, in generate | |
raise ChunkedEncodingError(e) | |
requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment