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

Catch UrlInfo read exceptions #58

Closed
Nekmo opened this issue Oct 22, 2018 · 0 comments
Closed

Catch UrlInfo read exceptions #58

Nekmo opened this issue Oct 22, 2018 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Nekmo
Copy link
Owner

Nekmo commented Oct 22, 2018

Traceback (most recent call last):
  File "/home/nekmo/Workspace/dirhunt/dirhunt/exceptions.py", line 43, in wrapped
    return func(*args, **kwargs)
  File "/home/nekmo/Workspace/dirhunt/dirhunt/url_info.py", line 162, in callback
    line = self._get_url_info(url_len, extra_len, file)
  File "/home/nekmo/Workspace/dirhunt/dirhunt/url_info.py", line 192, in _get_url_info
    return UrlInfo(self.sessions, file, self.timeout).line(size[0], url_len, extra_len)
  File "/home/nekmo/Workspace/dirhunt/dirhunt/url_info.py", line 115, in line
    if not len(self.text):
  File "/home/nekmo/Workspace/dirhunt/dirhunt/url_info.py", line 111, in text
    self._text = self.get_text()
  File "/home/nekmo/Workspace/dirhunt/dirhunt/url_info.py", line 104, in get_text
    text = self.data['title'] or self.data['body'] or self.data['text'] or ''
  File "/home/nekmo/Workspace/dirhunt/dirhunt/url_info.py", line 86, in data
    self._data = self.get_data()
  File "/home/nekmo/Workspace/dirhunt/dirhunt/url_info.py", line 59, in get_data
    text = resp.raw.read(MAX_RESPONSE_SIZE, decode_content=True)
  File "/home/nekmo/.virtualenvs/dirhunt/lib/python3.6/site-packages/urllib3/response.py", line 401, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/nekmo/.virtualenvs/dirhunt/lib/python3.6/site-packages/urllib3/response.py", line 307, in _error_catcher
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='xxxxxxxxxx', port=443): Read timed out.
Traceback (most recent call last):
  File "/home/nekmo/.virtualenvs/dirhunt/lib/python3.6/site-packages/urllib3/response.py", line 302, in _error_catcher
    yield
  File "/home/nekmo/.virtualenvs/dirhunt/lib/python3.6/site-packages/urllib3/response.py", line 384, in read
    data = self._fp.read(amt)
  File "/usr/lib/python3.6/http/client.py", line 449, in read
    n = self.readinto(b)
  File "/usr/lib/python3.6/http/client.py", line 493, in readinto
    n = self.fp.readinto(b)
  File "/usr/lib/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.6/ssl.py", line 1009, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.6/ssl.py", line 871, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
@Nekmo Nekmo added the bug Something isn't working label Oct 22, 2018
@Nekmo Nekmo added this to the v0.6.0 milestone Oct 22, 2018
@Nekmo Nekmo self-assigned this Oct 22, 2018
@Nekmo Nekmo changed the title Catch UrlInfo exceptions Catch UrlInfo read exceptions Oct 22, 2018
Nekmo added a commit that referenced this issue Oct 22, 2018
@Nekmo Nekmo closed this as completed Oct 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant