Python pip 使用 xmlrpc 时出现 AttributeError

Python pip 使用 xmlrpc 时出现 AttributeError

当我更新 pip 时出现此错误。

/usr/local/bin/pip run on Tue May  6 15:03:16 2014  
Exception:  
Traceback (most recent call last):  
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)  
  File "/usr/lib/python2.7/dist-packages/pip/commands/search.py", line 40, in run
    pypi_hits = self.search(query, index_url)  
  File "/usr/lib/python2.7/dist-packages/pip/commands/search.py", line 54, in search
    hits = pypi.search({'name': query, 'summary': query}, 'or')  
  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)  
  File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose  
  File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)   
  File "/usr/lib/python2.7/xmlrpclib.py", line 1292, in single_request
    self.send_content(h, request_body)  
  File "/usr/lib/python2.7/xmlrpclib.py", line 1439, in send_content
    connection.endheaders(request_body)   
  File "/usr/lib/python2.7/httplib.py", line 969, in endheaders
    self._send_output(message_body)   
  File "/usr/lib/python2.7/httplib.py", line 829, in _send_output
    self.send(msg)    
  File "/usr/lib/python2.7/httplib.py", line 805, in send
    self.sock.sendall(data)         

**AttributeError: 'NoneType' object has no attribute 'sendall'**

相关内容