Why does pip search fail for some terms?

2

It returns soon for terms such as sqlite, virtualenv , etc, but why it failed for django query?

This failure has happened for more than 3 times

pip search django
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/pip/basecommand.py", line 107, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.6/dist-packages/pip/commands/search.py", line 34, in run
    pypi_hits = self.search(query, index_url)
  File "/usr/local/lib/python2.6/dist-packages/pip/commands/search.py", line 48, in search
    hits = pypi.search({'name': query, 'summary': query}, 'or')
  File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.6/xmlrpclib.py", line 1253, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1382, in _parse_response
    response = file.read(1024)
  File "/usr/lib/python2.6/socket.py", line 377, in read
    data = self._sock.recv(left)
timeout: timed out

hugemeow

Posted 2012-10-16T06:17:19.940

Reputation: 1 819

4See the last line. Internet connection is timing out. – Sathyajith Bhat – 2012-10-16T06:21:21.573

yes, but why pip search virtualenv is not timeout? – hugemeow – 2012-10-16T08:41:32.210

Reopened because I can reproduce this behavior, at least the search takes way more time than for other packages. Why this is, I don't know. – slhck – 2012-10-16T15:39:09.660

Answers

1

There are many Python packages that have 'django' in their name so pypi fails to return all data in time. You could increase the timeout using --timeout option (default is 15 seconds).

jfs

Posted 2012-10-16T06:17:19.940

Reputation: 1 231