1. Tarek Ziadé
  2. distribute
  3. Issues
Issue #126 new

httplib.IncompleteRead error during `fetch_distribution`

Sridhar Ratnakumar
created an issue

In PyPM backend (pypi mirror), we are using setuptools.package_index to download packages. It would be nice to make it API friendly by catching these network-related errors under one custom exception.

{{{ sdist = pi.fetch_distribution(req, target_directory, source=True) File "/home/sridharr/.buildout-eggs/distribute-0.6.10-py2.6.egg/setuptools/package_index.py", line 466, i n fetch_distribution self.find_packages(requirement) File "/home/sridharr/.buildout-eggs/distribute-0.6.10-py2.6.egg/setuptools/package_index.py", line 307, in find_packages self.scan_url(self.index_url + requirement.unsafe_name+'/') File "/home/sridharr/.buildout-eggs/distribute-0.6.10-py2.6.egg/setuptools/package_index.py", line 641, in scan_url self.process_url(url, True) File "/home/sridharr/.buildout-eggs/distribute-0.6.10-py2.6.egg/setuptools/package_index.py", line 205, in process_url page = self.process_index(url, page) File "/home/sridharr/.buildout-eggs/distribute-0.6.10-py2.6.egg/setuptools/package_index.py", line 282, in process_index self.scan_url(new_url) File "/home/sridharr/.buildout-eggs/distribute-0.6.10-py2.6.egg/setuptools/package_index.py", line 641, in scan_url self.process_url(url, True) File "/home/sridharr/.buildout-eggs/distribute-0.6.10-py2.6.egg/setuptools/package_index.py", line 199, in process_url page = f.read() File "/opt/BareAPy-2.6/lib/python2.6/socket.py", line 329, in read data = self._sock.recv(rbufsize) File "/opt/BareAPy-2.6/lib/python2.6/httplib.py", line 518, in read return self._read_chunked(amt) File "/opt/BareAPy-2.6/lib/python2.6/httplib.py", line 576, in _read_chunked value.append(self._safe_read(chunk_left)) File "/opt/BareAPy-2.6/lib/python2.6/httplib.py", line 617, in _safe_read raise IncompleteRead(''.join(s), amt) }}}

Comments (1)

  1. Log in to comment