question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Checking packages from PyPI appears to be broken

See original GitHub issue

When attempting to check any package on PyPI with latest Pyroma (3.0.2), on both Windows and Linux on Python 3.7.x, an error results:

xmlrpc.client.Fault: <Fault -32500: 'HTTPTooManyRequests: The action could not be performed because there were too many requests by the client. Limit may reset in 1 seconds.'>

I’ve tested numerous times over the period of a day, with no luck. If I were to guess, this may be due to the domain and API changes involved in the transition to Warehouse/pypi.org from the old Cheeseshop/packages.pypi.org

$ pyroma -p black
------------------------------
Checking black
Found black version 20.8b1
Traceback (most recent call last):
  File "C:\Miniconda3\envs\cf-env\Scripts\pyroma-script.py", line 33, in <module>
    sys.exit(load_entry_point('pyroma', 'console_scripts', 'pyroma')())
  File "c:\users\c. a. m. gerlach\documents\dev\hypertool\pyroma\pyroma\__init__.py", line 101, in main
    rating = run(mode, argument)
  File "c:\users\c. a. m. gerlach\documents\dev\hypertool\pyroma\pyroma\__init__.py", line 120, in run
    data = pypidata.get_data(argument)
  File "c:\users\c. a. m. gerlach\documents\dev\hypertool\pyroma\pyroma\pypidata.py", line 37, in get_data
    data = client.release_data(project, release)
  File "C:\Miniconda3\envs\cf-env\lib\xmlrpc\client.py", line 1112, in __call__
    return self.__send(self.__name, args)
  File "C:\Miniconda3\envs\cf-env\lib\xmlrpc\client.py", line 1452, in __request
    verbose=self.__verbose
  File "C:\Miniconda3\envs\cf-env\lib\xmlrpc\client.py", line 1154, in request
    return self.single_request(host, handler, request_body, verbose)
  File "C:\Miniconda3\envs\cf-env\lib\xmlrpc\client.py", line 1170, in single_request
    return self.parse_response(resp)
  File "C:\Miniconda3\envs\cf-env\lib\xmlrpc\client.py", line 1342, in parse_response
    return u.close()
  File "C:\Miniconda3\envs\cf-env\lib\xmlrpc\client.py", line 656, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -32500: 'HTTPTooManyRequests: The action could not be performed because there were too many requests by the client. Limit may reset in 1 seconds.'>

In addition, a ResourcesWarning is generated due to the XMLRPC client not being opened in a context manager, thus leaking an unclosed socket

sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=592, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.101', 64493), raddr=('151.101.64.223', 443)>

Unless its something simple, if this was due to the PyPI API changes it likely needs a full rewrite. If that’s not feasible to do in the near-term, this feature should presumably be disabled with a friendlier and more informative error message, or removed.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
regebrocommented, Jun 22, 2021

3.2 released

1reaction
regebrocommented, Apr 27, 2021

Yeah, I must have pressed the wrong button, not the first time…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Find outdated/updatable pip packages - Super User
Since version 1.3, pip features a new command: $ pip list --outdated requests (Current: 1.1.0 Latest: 1.2.0). See this post for more information....
Read more >
Broken/Unmaintained Python Projects on Pypi.org: Flag and ...
Such Python project on Pypi.org should be flagged as either Broken/Deprecated/Unmaintained, thereby to notify the owners/maintainers that this ...
Read more >
What to do when you botch a release on PyPI
What this does is it tells PyPI to not list the version on the site. ... files they will not be suddenly broken...
Read more >
How To Check For Python Dependencies - ActiveState
Click to check for Python dependencies with different package managers such as pip, ... pip check No broken requirements found.
Read more >
How to Fix Pip “Yanked Version” Warnings - Adam Johnson
PyPI allows package maintainers to yank a given version. This is intended for removing versions with bad faults, such as security holes or ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found