Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Catch ChunkError #106

Closed
dirtycajunrice opened this issue Feb 20, 2019 · 0 comments
Closed

[BUG] Catch ChunkError #106

dirtycajunrice opened this issue Feb 20, 2019 · 0 comments
Labels
approved Enhancement or request that was approved to be worked on bug Something isn't working in-next-release In the next release

Comments

@dirtycajunrice
Copy link
Member

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 601, 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 "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 360, in _error_catcher
    yield
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 666, in read_chunked
    self._update_chunk_length()
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 605, 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 "/usr/local/lib/python3.7/site-packages/requests/models.py", line 750, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 490, in stream
    for line in self.read_chunked(amt, decode_content=decode_content):
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 694, in read_chunked
    self._original_response.close()
  File "/usr/local/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 378, 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/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/app/Varken.py", line 34, in thread
    a = job()
  File "/app/varken/radarr.py", line 28, in get_missing
    get = connection_handler(self.session, req, self.server.verify_ssl)
  File "/app/varken/helpers.py", line 119, in connection_handler
    get = s.send(r, verify=v)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 686, in send
    r.content
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 828, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 753, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))

Looks like we need to catch this in helpers.py

@dirtycajunrice dirtycajunrice added awaiting-triage Request awaiting triage bug Something isn't working approved Enhancement or request that was approved to be worked on and removed awaiting-triage Request awaiting triage labels Feb 20, 2019
dirtycajunrice added a commit that referenced this issue Mar 12, 2019
@dirtycajunrice dirtycajunrice added the in-next-release In the next release label Mar 12, 2019
@Boerderij Boerderij locked and limited conversation to collaborators Mar 19, 2019
dirtycajunrice added a commit that referenced this issue Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Enhancement or request that was approved to be worked on bug Something isn't working in-next-release In the next release
Projects
None yet
Development

No branches or pull requests

2 participants