Skip to content

Instantly share code, notes, and snippets.

@hancush
Created November 21, 2017 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hancush/3ecfb14e3fdf7f52b34e110983b664d4 to your computer and use it in GitHub Desktop.
Save hancush/3ecfb14e3fdf7f52b34e110983b664d4 to your computer and use it in GitHub Desktop.
16:42:54 INFO scrapelib: GET - https://webapi.legistar.com/v1/nyc/matters/53903/texts/55398
Traceback (most recent call last):
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 280, in recv_into
    return self.connection.recv_into(*args, **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1625, in recv_into
    self._raise_ssl_error(self._ssl, result)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1431, in _raise_ssl_error
    raise WantReadError()
OpenSSL.SSL.WantReadError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 280, in recv_into
    return self.connection.recv_into(*args, **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1625, in recv_into
    self._raise_ssl_error(self._ssl, result)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1431, in _raise_ssl_error
    raise WantReadError()
OpenSSL.SSL.WantReadError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 280, in recv_into
    return self.connection.recv_into(*args, **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1625, in recv_into
    self._raise_ssl_error(self._ssl, result)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1431, in _raise_ssl_error
    raise WantReadError()
OpenSSL.SSL.WantReadError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 280, in recv_into
    return self.connection.recv_into(*args, **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1625, in recv_into
    self._raise_ssl_error(self._ssl, result)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1431, in _raise_ssl_error
    raise WantReadError()
OpenSSL.SSL.WantReadError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 280, in recv_into
    return self.connection.recv_into(*args, **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1625, in recv_into
    self._raise_ssl_error(self._ssl, result)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1431, in _raise_ssl_error
    raise WantReadError()
OpenSSL.SSL.WantReadError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 280, in recv_into
    return self.connection.recv_into(*args, **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1625, in recv_into
    self._raise_ssl_error(self._ssl, result)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1448, in _raise_ssl_error
    raise SysCallError(errno, errorcode.get(errno))
OpenSSL.SSL.SysCallError: (54, 'ECONNRESET')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/response.py", line 302, in _error_catcher
    yield
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/response.py", line 384, in read
    data = self._fp.read(amt)
  File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 448, in read
    n = self.readinto(b)
  File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 488, in readinto
    n = self.fp.readinto(b)
  File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/socket.py", line 575, in readinto
    return self._sock.recv_into(b)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 296, in recv_into
    return self.recv_into(*args, **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 296, in recv_into
    return self.recv_into(*args, **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 296, in recv_into
    return self.recv_into(*args, **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 296, in recv_into
    return self.recv_into(*args, **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 296, in recv_into
    return self.recv_into(*args, **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 285, in recv_into
    raise SocketError(str(e))
OSError: (54, 'ECONNRESET')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/requests/models.py", line 745, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/response.py", line 436, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/response.py", line 401, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/urllib3/response.py", line 320, in _error_catcher
    raise ProtocolError('Connection broken: %r' % e, e)
urllib3.exceptions.ProtocolError: ('Connection broken: OSError("(54, \'ECONNRESET\')",)', OSError("(54, 'ECONNRESET')",))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/Hannah/.virtualenvs/ocd/bin/pupa", line 11, in <module>
    load_entry_point('pupa==0.8.0.dev0', 'console_scripts', 'pupa')()
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/pupa/cli/__main__.py", line 67, in main
    subcommands[args.subcommand].handle(args, other)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/pupa/cli/commands/update.py", line 259, in handle
    return self.do_handle(args, other, juris)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/pupa/cli/commands/update.py", line 304, in do_handle
    report['scrape'] = self.do_scrape(juris, args, scrapers)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/pupa/cli/commands/update.py", line 172, in do_scrape
    report[scraper_name] = scraper.do_scrape(**scrape_args)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/pupa/scrape/base.py", line 102, in do_scrape
    for obj in self.scrape(**kwargs) or []:
  File "/Users/Hannah/hackz/datamade/scrapers-us-municipal/nyc/bills.py", line 256, in scrape
    text = self.text(matter_id)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/legistar/bills.py", line 319, in text
    response = self.get(text_url, stream=True)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/requests/sessions.py", line 521, in get
    return self.request('GET', url, **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/scrapelib/__init__.py", line 286, in request
    **kwargs)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/scrapelib/cache.py", line 69, in request
    self.cache_storage.set(request_key, resp)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/scrapelib/cache.py", line 181, in set
    f.write(response.content)
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/requests/models.py", line 823, in content
    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
  File "/Users/Hannah/.virtualenvs/ocd/lib/python3.5/site-packages/requests/models.py", line 748, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ('Connection broken: OSError("(54, \'ECONNRESET\')",)', OSError("(54, 'ECONNRESET')",))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment