Bug 2115847 - most command of python3-pip fails with exception: TypeError: expected string or bytes-like object, got 'NoneType'
Summary: most command of python3-pip fails with exception: TypeError: expected string ...
Keywords:
Status: CLOSED DUPLICATE of bug 2115001
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pip
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Python Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-05 14:30 UTC by Yann Droneaud
Modified: 2022-08-05 14:51 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-05 14:51:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
python3 -m pip debug --verbose (30.35 KB, text/plain)
2022-08-05 14:32 UTC, Yann Droneaud
no flags Details
python3 -m pip --no-color --verbose list (4.44 KB, text/plain)
2022-08-05 14:34 UTC, Yann Droneaud
no flags Details
python3 -m pip --no-color --verbose --debug list (69.98 KB, text/plain)
2022-08-05 14:37 UTC, Yann Droneaud
no flags Details

Description Yann Droneaud 2022-08-05 14:30:53 UTC
Running most if not all python3-pip command lead to traceback:

      File "/usr/lib/python3.11/site-packages/pip/_internal/metadata/base.py", line 604, in 
iter_all_distributions
        for dist in self._iter_distributions():
      File "/usr/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 167, in _iter_distributions
        yield from finder.find(location)
      File "/usr/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 71, in find
        for dist, info_location in self._find_impl(location):
      File "/usr/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 59, in _find_impl
        normalized_name = canonicalize_name(get_dist_name(dist))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/site-packages/pip/_vendor/packaging/utils.py", line 34, in canonicalize_name
        value = _canonicalize_regex.sub("-", name).lower()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: expected string or bytes-like object, got 'NoneType'


The following packages are installed:

    python3-3.11.0~b5-1.fc37.x86_64
    python3-setuptools-62.6.0-2.fc37.noarch
    python3-pip-22.2-1.fc37.noarch

At least the following commands failed:

    python3 -m pip list
    python3 -m pip inspect
    python3 -m pip install

Comment 1 Yann Droneaud 2022-08-05 14:32:45 UTC
Created attachment 1903962 [details]
python3 -m pip debug --verbose

Comment 2 Yann Droneaud 2022-08-05 14:34:53 UTC
Created attachment 1903963 [details]
python3 -m pip --no-color --verbose list

full traceback

Comment 3 Yann Droneaud 2022-08-05 14:37:47 UTC
Created attachment 1903964 [details]
python3 -m pip --no-color --verbose --debug list

Traceback when --debug is added to the command line

Comment 4 Yann Droneaud 2022-08-05 14:42:47 UTC
abrt get notified of the failure:

    Id         3e414b0  
    Component  python-pip  
    Count      1  
    Time       2022-08-05 15:53:00  
    User id    1000 (ydroneaud)  
             
    Id         361387f  
    Component  python-pip  
    Count      6  
    Time       2022-08-05 15:55:53  
    User id    1000 (ydroneaud)

but failed to report them:

    abrt-cli report --verbose 361387f 
    Reporting problem 361387f

    Connecting to https://retrace.fedoraproject.org/faf/reports/new/
    Server responded with an error: 'uReport data is invalid.'
    reporter-ureport failed with exit code 1
    ('report_uReport' exited with 1)

Comment 5 Miro Hrončok 2022-08-05 14:51:39 UTC
Thanks for the report. We already got a very similar one, so I'll merge them.

*** This bug has been marked as a duplicate of bug 2115001 ***


Note You need to log in before you can comment on or make changes to this bug.