Git Product home page Git Product logo

basket's People

Contributors

dbaty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

basket's Issues

Download fails with RuntimeError: PyPI's XMLRPC API is currently disabled

Trying to download packages, the following happens:

> basket download pywin32
Traceback (most recent call last):
  File "C:\Program Files\Python310\Scripts\basket-script.py", line 33, in <module>
    sys.exit(load_entry_point('Basket==1.0', 'console_scripts', 'basket')())
  File "C:\Program Files\Python310\lib\site-packages\basket\main.py", line 338, in main
    return basket.cmd_download(argv)
  File "C:\Program Files\Python310\lib\site-packages\basket\main.py", line 220, in cmd_download
    info = self._find_package_name(package)
  File "C:\Program Files\Python310\lib\site-packages\basket\main.py", line 88, in _find_package_name
    for info in self.client.search({'name': query}):
  File "C:\Program Files\Python310\lib\xmlrpc\client.py", line 1122, in __call__
    return self.__send(self.__name, args)
  File "C:\Program Files\Python310\lib\xmlrpc\client.py", line 1464, in __request
    response = self.__transport.request(
  File "C:\Program Files\Python310\lib\xmlrpc\client.py", line 1166, in request
    return self.single_request(host, handler, request_body, verbose)
  File "C:\Program Files\Python310\lib\xmlrpc\client.py", line 1182, in single_request
    return self.parse_response(resp)
  File "C:\Program Files\Python310\lib\xmlrpc\client.py", line 1354, in parse_response
    return u.close()
  File "C:\Program Files\Python310\lib\xmlrpc\client.py", line 668, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -32500: "RuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.">
>

I understand that this interface has been disabled intentionally because of DoS-like issues.

Is there any way to use basket now?

Basket downloads only the Pypi package, not it's dependencies

I am using Basket to download Python packages from PyPI server and store them in a single place so that they can be found by easy_install or pip when offline. but basket downloads only the Pypi package, not it's dependencies. So, while installing package in offline pip fails because of unmet dependencies. Please implement dependency download facility too.

I am used basket version obtained from Pypi site.

basket download command shows "ProtocolError for pypi.python.org/pypi: 403 Must access using HTTPS instead of HTTP" message.

I am trying to download a Pypi package using basket. but the command shows "ProtocolError for pypi.python.org/pypi: 403 Must access using HTTPS instead of HTTP" message.

My command is : sudo basket download unittest2

The response is :

Traceback (most recent call last):
  File "/usr/local/bin/basket", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/basket/main.py", line 338, in main
    return basket.cmd_download(argv)
  File "/usr/local/lib/python2.7/dist-packages/basket/main.py", line 220, in cmd_download
    info = self._find_package_name(package)
  File "/usr/local/lib/python2.7/dist-packages/basket/main.py", line 88, in _find_package_name
    for info in self.client.search({'name': query}):
  File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1331, in single_request
    response.msg,
xmlrpclib.ProtocolError: <ProtocolError for pypi.python.org/pypi: 403 Must access using HTTPS instead of HTTP>


but pip download command is working fine for me.

My command and response is :

pip download unittest2
Collecting unittest2
Downloading unittest2-1.1.0-py2.py3-none-any.whl (96kB)
100% |████████████████████████████████| 102kB 107kB/s
Saved ./unittest2-1.1.0-py2.py3-none-any.whl
Collecting argparse (from unittest2)
Downloading argparse-1.4.0-py2.py3-none-any.whl
Saved ./argparse-1.4.0-py2.py3-none-any.whl
Collecting traceback2 (from unittest2)
Downloading traceback2-1.4.0-py2.py3-none-any.whl
Saved ./traceback2-1.4.0-py2.py3-none-any.whl
Collecting six>=1.4 (from unittest2)
Downloading six-1.10.0-py2.py3-none-any.whl
Saved ./six-1.10.0-py2.py3-none-any.whl
Collecting linecache2 (from traceback2->unittest2)
Downloading linecache2-1.0.0-py2.py3-none-any.whl
Saved ./linecache2-1.0.0-py2.py3-none-any.whl
Successfully downloaded unittest2 argparse traceback2 six linecache2

I posted a question in stackoverflow and got a working answer, that is...

You have to go into /path-to-python-site-packages/basket/main.py, and edit the following line:

PYPI_ENDPOINT = 'http://pypi.python.org/pypi'
And Change it to "https":

PYPI_ENDPOINT = 'https://pypi.python.org/pypi'
Then your downloads should work. Issue is related to "http" being provided to "xmlrpclib.ServerProxy"

It is Working in my windows python 3 environment, not tested in my Ubuntu python 2 environment. i think it will work after this patch. Please make this change after necessary testing and update Pypi repositories.

The stackoverflow question URL is Protocol Error on basket download request

Using proxy?

Hello,

I'm currently behind a company proxy. Normally I can use the HTTP_PROXY and HTTPS_PROXY when using pip. Then, pip works as expected.

But Basket does not work like this.

Any thoughts or solutions? Am I missing something obvious?

Thanks so much for building such a useful library!
Vincent

Must access using HTTPS instead of HTTP

Running basket download python-nmap returns me an error:

Traceback (most recent call last):
  File "/usr/local/bin/basket", line 9, in <module>
    load_entry_point('Basket==1.0', 'console_scripts', 'basket')()
  File "/usr/local/lib/python3.5/site-packages/basket/main.py", line 338, in main
    return basket.cmd_download(argv)
  File "/usr/local/lib/python3.5/site-packages/basket/main.py", line 220, in cmd_download
    info = self._find_package_name(package)
  File "/usr/local/lib/python3.5/site-packages/basket/main.py", line 88, in _find_package_name
    for info in self.client.search({'name': query}):
  File "/usr/local/lib/python3.5/xmlrpc/client.py", line 1092, in __call__
    return self.__send(self.__name, args)
  File "/usr/local/lib/python3.5/xmlrpc/client.py", line 1432, in __request
    verbose=self.__verbose
  File "/usr/local/lib/python3.5/xmlrpc/client.py", line 1134, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/local/lib/python3.5/xmlrpc/client.py", line 1167, in single_request
    dict(resp.getheaders())
xmlrpc.client.ProtocolError: <ProtocolError for pypi.python.org/pypi: 403 Must access using HTTPS instead of HTTP>

with basket packet pulled from pip. It seems outdated as your code has been corrected since.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.