Basket icon indicating copy to clipboard operation
Basket copied to clipboard

Could not find any package

Open alexandrenorman opened this issue 9 years ago • 1 comments

With git commit c9fff6d562f3649399b74d4cc62e00041db80cee, I am not able to download any package:

$ basket download django
Could not find any package named "django".

alexandrenorman avatar Sep 22 '16 06:09 alexandrenorman

I tried this morning and could not download "Django" indeed. However, downloading other packages works fine:

$ basket download numpy
Added numpy 1.11.2rc1.
$ basket download django
Could not find any package named "django".

PyPI XML-RPC search mechanism returns 5840 packages that have "django" in their name, but "Django" itself is not one of them.

This is what Basket does (more or less):

>>> [i for i in self.client.search({'name': query}) if i['name'].lower() == 'django']
[]

If we add a criterion to the query, we do get "Django":

>>> [i for i in self.client.search({'name': query, 'author': 'Django Software Foundation'})
...    if i['name'].lower() == 'django']
[{..., 'name': 'Django', 'summary': '...'}]

My guess is that PyPI returns a limited amount of items, although 5840 would be a surprising constant for this. Unfortunately I don't have time right now to dig deeper.

dbaty avatar Sep 22 '16 08:09 dbaty

Well, we'll never know. :) The XML-RPC API does not implement the search function work anymore:

xmlrpc.client.Fault: <Fault -32500: "RuntimeError: PyPI no longer supports 'pip search' (or XML-RPC search). Please use https://pypi.org/search (via a browser) instead. See https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods for more information.">

Basket does not work anymore and has not been supported for years (as can be seen in this very issue). I just added a note in the README about that, with a migration guide to pip: https://github.com/dbaty/Basket#readme.

Hope it helps! :)

dbaty avatar Jul 24 '23 14:07 dbaty