1. Martin von Löwis
  2. pep381client
  3. Issues
Issue #27 new

pep381run broken when restart: httplib.ResponseNotReady

johnwang507
created an issue

After I stop (by Ctr+C) it and then restart , pep381run raise error as the following:

E:\tmp>pep381run.py pypi
Synchronizing OBITools
Copying /packages/source/O/OBITools/OBITools-0.2.000.tar.gz
Copying /packages/source/O/OBITools/OBITools-0.2.002.tar.gz
Copying /packages/source/O/OBITools/OBITools-00.02.503.tar.gz
Copying /packages/source/O/OBITools/OBITools-00.02.500.tar.gz
Traceback (most recent call last):
  File "D:\Python27\Scripts\pep381run.py", line 31, in <module>
    state.synchronize()
  File "D:\Python27\lib\site-packages\pep381client\__init__.py", line 119, in synchronize
    self._synchronize()
  File "D:\Python27\lib\site-packages\pep381client\__init__.py", line 159, in _synchronize
    self.maybe_copy_file(project, file)
  File "D:\Python27\lib\site-packages\pep381client\__init__.py", line 237, in maybe_copy_file
    r = h.getresponse()
  File "D:\Python27\lib\httplib.py", line 1033, in getresponse
    raise ResponseNotReady()
httplib.ResponseNotReady

Comments (2)

  1. johnwang507 reporter

    Reminded by this question , after making a dirty and desperate change to the code as the following:

    def http():
        global _conn
        _conn = httplib.HTTPSConnection(pypi) 
        _conn.connect()
        return _conn
    

    It works again.

  2. Log in to comment