homeconnect icon indicating copy to clipboard operation
homeconnect copied to clipboard

Errors from SSE events thread

Open SantaFox opened this issue 4 years ago • 0 comments

In test application from this repository, sometime (a quite rare) I receive the following output. Then these tracebacks are repeated a few times, and then it continues with one error message: Failed connecting.

Exception while reading event:
Traceback (most recent call last):
  File "C:\Users\SantaFox\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\response.py", line 697, 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 "C:\Users\SantaFox\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\response.py", line 438, in _error_catcher
    yield
  File "C:\Users\SantaFox\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\response.py", line 764, in read_chunked
    self._update_chunk_length()
  File "C:\Users\SantaFox\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\response.py", line 701, in _update_chunk_length
    raise InvalidChunkLength(self, line)
urllib3.exceptions.InvalidChunkLength: InvalidChunkLength(got length b'', 0 bytes read)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\SantaFox\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\models.py", line 753, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "C:\Users\SantaFox\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\response.py", line 572, in stream
    for line in self.read_chunked(amt, decode_content=decode_content):
  File "C:\Users\SantaFox\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\response.py", line 793, in read_chunked
    self._original_response.close()
  File "C:\Users\SantaFox\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 135, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Users\SantaFox\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\response.py", line 455, in _error_catcher
    raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\SantaFox\Documents\Pythopn\test2\sseclient.py", line 81, in __next__
    next_chunk = next(self.resp_iterator)
  File "C:\Users\SantaFox\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\models.py", line 756, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))
Exception while reading event:
Traceback (most recent call last):
  File "C:\Users\SantaFox\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\response.py", line 697, in _update_chunk_length
    self.chunk_left = int(line, 16)
ValueError: invalid literal for int() with base 16: b''

SantaFox avatar Dec 08 '20 10:12 SantaFox