-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad metadata: TypeError: expected string or bytes-like object, got 'NoneType' #11352
Comments
Can you run pip with |
|
IMHO here: pip/src/pip/_internal/metadata/importlib/_envs.py Lines 57 to 59 in 8070892
If |
Ignoring bad metadata with a warning is a good solution to me. Do we need to worry how the bad metadata get in there in the first place? Or are those generated by Fedora so we don’t need to worry? |
In our case, it seems this was an RPM packaging error in the mercurial package. The package "owned" the files in the egg info directory but not the directory itself, so when it was removed/updated, the directory stayed on the system. I've reported that to the Fedora maintainer of mercurial. |
For google-ability I got the same issue with installing pytz 2022.2.1:
Fix was to upgrade to pytz 2022.2.1 which it appears has corrected metadata. |
BTW, the warning is quite noisy:
|
We are hit by pypa/pip#11352 which has been fixed on the main branch, but not yet on a release.
Description
Since pip 22, several Fedora Rawhide users reported the following problem for many (all?) pip commands:
I could not reproduce at first, but after investigation, @encukou figured out that this works as a repducer:
This is not Fedora-pip specific, I can reproduce it in the official python:3.11.0b5 container (see the reproducer below).
This happens with pip-22.2.2, pip-22.2.
This does not happen with pip-21.3.1.
This does not seem to happen with Python 3.10.
I suspect this is related to the switch to importlib metadata.
Expected behavior
This is how it worked before:
pip version
22.2.2
Python version
3.11.0b5
OS
Linux
How to Reproduce
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: