Skip to content
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

pip Error while checking for conflicts #13127

Open
1 task done
moh-12345 opened this issue Dec 25, 2024 · 3 comments
Open
1 task done

pip Error while checking for conflicts #13127

moh-12345 opened this issue Dec 25, 2024 · 3 comments
Labels
S: awaiting response Waiting for a response/more information type: support User Support

Comments

@moh-12345
Copy link

Description

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in /home/kali/.local/lib/python3.12/site-packages (24.3.1)
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
File "/home/kali/.local/lib/python3.12/site-packages/pip/_internal/commands/install.py", line 584, in _determine_conflicts
return check_install_conflicts(to_install)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_internal/operations/check.py", line 117, in check_install_conflicts
package_set, _ = create_package_set_from_installed()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_internal/operations/check.py", line 59, in create_package_set_from_installed
package_set[name] = PackageDetails(dist.version, dependencies)
^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py", line 168, in version
return parse_version(self._dist.version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_vendor/packaging/version.py", line 56, in parse
return Version(version)
^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_vendor/packaging/version.py", line 200, in init
match = self._regex.search(version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'

Expected behavior

No response

pip version

24.3.1

Python version

Python 3.12.8

OS

kali linux VERSION="2024.4"

How to Reproduce

python3 -m pip install --upgrade pip --break-system-packages

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in /home/kali/.local/lib/python3.12/site-packages (24.3.1)
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
File "/home/kali/.local/lib/python3.12/site-packages/pip/_internal/commands/install.py", line 584, in _determine_conflicts
return check_install_conflicts(to_install)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_internal/operations/check.py", line 117, in check_install_conflicts
package_set, _ = create_package_set_from_installed()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_internal/operations/check.py", line 59, in create_package_set_from_installed
package_set[name] = PackageDetails(dist.version, dependencies)
^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py", line 168, in version
return parse_version(self._dist.version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_vendor/packaging/version.py", line 56, in parse
return Version(version)
^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_vendor/packaging/version.py", line 200, in init
match = self._regex.search(version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'

Output

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in /home/kali/.local/lib/python3.12/site-packages (24.3.1)
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
File "/home/kali/.local/lib/python3.12/site-packages/pip/_internal/commands/install.py", line 584, in _determine_conflicts
return check_install_conflicts(to_install)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_internal/operations/check.py", line 117, in check_install_conflicts
package_set, _ = create_package_set_from_installed()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_internal/operations/check.py", line 59, in create_package_set_from_installed
package_set[name] = PackageDetails(dist.version, dependencies)
^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py", line 168, in version
return parse_version(self._dist.version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_vendor/packaging/version.py", line 56, in parse
return Version(version)
^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.12/site-packages/pip/_vendor/packaging/version.py", line 200, in init
match = self._regex.search(version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'

Code of Conduct

@moh-12345 moh-12345 added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Dec 25, 2024
@ichard26 ichard26 added type: support User Support and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Dec 29, 2024
@ichard26
Copy link
Member

Could you try the command again with --debug and share the traceback here? You probably have a corrupted package installed somewhere in your environment, but it's impossible to tell what's blowing up from the stacktrace.

@notatallshaw notatallshaw added the S: awaiting response Waiting for a response/more information label Jan 2, 2025
@AndreeaPocol
Copy link

I suspect I may also have this corrupt package issue and would appreciate any advice.

pip version

25.0.1

Python version

Python 3.11.4

I am getting this error on my pip commands, including a simple freeze:

% pip freeze --debug        
╭────────────────────── Traceback (most recent call last) ───────────────────────╮
│ /opt/homebrew/bin/pip:8 in <module>                                            │
│                                                                                │
│   5 from pip._internal.cli.main import main                                    │
│   6 if __name__ == '__main__':                                                 │
│   7 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])       │
│ ❱ 8 │   sys.exit(main())                                                       │
│   9                                                                            │
│                                                                                │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │  re = <module 're' from                                                    │ │
│ │       '/opt/homebrew/Cellar/python@3.11/3.11.4_1/Frameworks/Python.framew… │ │
│ │ sys = <module 'sys' (built-in)>                                            │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                │
│ /opt/homebrew/lib/python3.11/site-packages/pip/_internal/cli/main.py:80 in     │
│ main                                                                           │
│                                                                                │
│   77 │   │   logger.debug("Ignoring error %s when setting locale", e)          │
│   78 │   command = create_command(cmd_name, isolated=("--isolated" in cmd_args │
│   79 │                                                                         │
│ ❱ 80 │   return command.main(cmd_args)                                         │
│   81                                                                           │
│                                                                                │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │     args = ['freeze', '--debug']                                           │ │
│ │ cmd_args = ['--debug']                                                     │ │
│ │ cmd_name = 'freeze'                                                        │ │
│ │  command = <pip._internal.commands.freeze.FreezeCommand object at          │ │
│ │            0x10493e250>                                                    │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                │
│ /opt/homebrew/lib/python3.11/site-packages/pip/_internal/cli/base_command.py:1 │
│ 58 in main                                                                     │
│                                                                                │
│   155 │   def main(self, args: List[str]) -> int:                              │
│   156 │   │   try:                                                             │
│   157 │   │   │   with self.main_context():                                    │
│ ❱ 158 │   │   │   │   return self._main(args)                                  │
│   159 │   │   finally:                                                         │
│   160 │   │   │   logging.shutdown()                                           │
│   161                                                                          │
│                                                                                │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │ args = ['--debug']                                                         │ │
│ │ self = <pip._internal.commands.freeze.FreezeCommand object at 0x10493e250> │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                │
│ /opt/homebrew/lib/python3.11/site-packages/pip/_internal/cli/base_command.py:2 │
│ 40 in _main                                                                    │
│                                                                                │
│   237 │   │   │   │   issue=13154,                                             │
│   238 │   │   │   )                                                            │
│   239 │   │                                                                    │
│ ❱ 240 │   │   return self._run_wrapper(level_number, options, args)            │
│   241                                                                          │
│                                                                                │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │ always_enabled_features = set()                                            │ │
│ │                    args = []                                               │ │
│ │            level_number = 20                                               │ │
│ │                 options = <Values at 0x1065d7e50: {'help': None,           │ │
│ │                           'debug_mode': True, 'isolated_mode': False,      │ │
│ │                           'require_venv': False, 'python': None,           │ │
│ │                           'verbose': 0, 'version': None, 'quiet': 0,       │ │
│ │                           'log': None, 'no_input': False,                  │ │
│ │                           'keyring_provider': 'auto', 'proxy': '',         │ │
│ │                           'retries': 5, 'timeout': 15, 'exists_action':    │ │
│ │                           [], 'trusted_hosts': [], 'cert': None,           │ │
│ │                           'client_cert': None, 'cache_dir':                │ │
│ │                           '/Users/andreeapocol/Library/Caches/pip',        │ │
│ │                           'disable_pip_version_check': False, 'no_color':  │ │
│ │                           False, 'no_python_version_warning': False,       │ │
│ │                           'features_enabled': [],                          │ │
│ │                           'deprecated_features_enabled': [],               │ │
│ │                           'requirements': [], 'local': False, 'user':      │ │
│ │                           False, 'path': None, 'freeze_all': None,         │ │
│ │                           'exclude_editable': None, 'excludes': None}>     │ │
│ │                    self = <pip._internal.commands.freeze.FreezeCommand     │ │
│ │                           object at 0x10493e250>                           │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                │
│ /opt/homebrew/lib/python3.11/site-packages/pip/_internal/cli/base_command.py:1 │
│ 03 in _run_wrapper                                                             │
│                                                                                │
│   100 │   │                                                                    │
│   101 │   │   if options.debug_mode:                                           │
│   102 │   │   │   rich_traceback.install(show_locals=True)                     │
│ ❱ 103 │   │   │   return _inner_run()                                          │
│   104 │   │                                                                    │
│   105 │   │   try:                                                             │
│   106 │   │   │   status = _inner_run()                                        │
│                                                                                │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │         args = []                                                          │ │
│ │ level_number = 20                                                          │ │
│ │      options = <Values at 0x1065d7e50: {'help': None, 'debug_mode': True,  │ │
│ │                'isolated_mode': False, 'require_venv': False, 'python':    │ │
│ │                None, 'verbose': 0, 'version': None, 'quiet': 0, 'log':     │ │
│ │                None, 'no_input': False, 'keyring_provider': 'auto',        │ │
│ │                'proxy': '', 'retries': 5, 'timeout': 15, 'exists_action':  │ │
│ │                [], 'trusted_hosts': [], 'cert': None, 'client_cert': None, │ │
│ │                'cache_dir': '/Users/andreeapocol/Library/Caches/pip',      │ │
│ │                'disable_pip_version_check': False, 'no_color': False,      │ │
│ │                'no_python_version_warning': False, 'features_enabled': [], │ │
│ │                'deprecated_features_enabled': [], 'requirements': [],      │ │
│ │                'local': False, 'user': False, 'path': None, 'freeze_all':  │ │
│ │                None, 'exclude_editable': None, 'excludes': None}>          │ │
│ │         self = <pip._internal.commands.freeze.FreezeCommand object at      │ │
│ │                0x10493e250>                                                │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                │
│ /opt/homebrew/lib/python3.11/site-packages/pip/_internal/cli/base_command.py:9 │
│ 7 in _inner_run                                                                │
│                                                                                │
│    94 │   def _run_wrapper(self, level_number: int, options: Values, args: Lis │
│    95 │   │   def _inner_run() -> int:                                         │
│    96 │   │   │   try:                                                         │
│ ❱  97 │   │   │   │   return self.run(options, args)                           │
│    98 │   │   │   finally:                                                     │
│    99 │   │   │   │   self.handle_pip_version_check(options)                   │
│   100                                                                          │
│                                                                                │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │    args = []                                                               │ │
│ │ options = <Values at 0x1065d7e50: {'help': None, 'debug_mode': True,       │ │
│ │           'isolated_mode': False, 'require_venv': False, 'python': None,   │ │
│ │           'verbose': 0, 'version': None, 'quiet': 0, 'log': None,          │ │
│ │           'no_input': False, 'keyring_provider': 'auto', 'proxy': '',      │ │
│ │           'retries': 5, 'timeout': 15, 'exists_action': [],                │ │
│ │           'trusted_hosts': [], 'cert': None, 'client_cert': None,          │ │
│ │           'cache_dir': '/Users/andreeapocol/Library/Caches/pip',           │ │
│ │           'disable_pip_version_check': False, 'no_color': False,           │ │
│ │           'no_python_version_warning': False, 'features_enabled': [],      │ │
│ │           'deprecated_features_enabled': [], 'requirements': [], 'local':  │ │
│ │           False, 'user': False, 'path': None, 'freeze_all': None,          │ │
│ │           'exclude_editable': None, 'excludes': None}>                     │ │
│ │    self = <pip._internal.commands.freeze.FreezeCommand object at           │ │
│ │           0x10493e250>                                                     │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                │
│ /opt/homebrew/lib/python3.11/site-packages/pip/_internal/commands/freeze.py:99 │
│ in run                                                                         │
│                                                                                │
│    96 │   │                                                                    │
│    97 │   │   cmdoptions.check_list_path_option(options)                       │
│    98 │   │                                                                    │
│ ❱  99 │   │   for line in freeze(                                              │
│   100 │   │   │   requirement=options.requirements,                            │
│   101 │   │   │   local_only=options.local,                                    │
│   102 │   │   │   user_only=options.user,                                      │
│                                                                                │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │    args = []                                                               │ │
│ │ options = <Values at 0x1065d7e50: {'help': None, 'debug_mode': True,       │ │
│ │           'isolated_mode': False, 'require_venv': False, 'python': None,   │ │
│ │           'verbose': 0, 'version': None, 'quiet': 0, 'log': None,          │ │
│ │           'no_input': False, 'keyring_provider': 'auto', 'proxy': '',      │ │
│ │           'retries': 5, 'timeout': 15, 'exists_action': [],                │ │
│ │           'trusted_hosts': [], 'cert': None, 'client_cert': None,          │ │
│ │           'cache_dir': '/Users/andreeapocol/Library/Caches/pip',           │ │
│ │           'disable_pip_version_check': False, 'no_color': False,           │ │
│ │           'no_python_version_warning': False, 'features_enabled': [],      │ │
│ │           'deprecated_features_enabled': [], 'requirements': [], 'local':  │ │
│ │           False, 'user': False, 'path': None, 'freeze_all': None,          │ │
│ │           'exclude_editable': None, 'excludes': None}>                     │ │
│ │    self = <pip._internal.commands.freeze.FreezeCommand object at           │ │
│ │           0x10493e250>                                                     │ │
│ │    skip = {                                                                │ │
│ │           │   'distribute',                                                │ │
│ │           │   'wheel',                                                     │ │
│ │           │   'argparse',                                                  │ │
│ │           │   'setuptools',                                                │ │
│ │           │   'pip',                                                       │ │
│ │           │   'wsgiref',                                                   │ │
│ │           │   'python'                                                     │ │
│ │           }                                                                │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                │
│ /opt/homebrew/lib/python3.11/site-packages/pip/_internal/operations/freeze.py: │
│ 44 in freeze                                                                   │
│                                                                                │
│    41 │   │   user_only=user_only,                                             │
│    42 │   )                                                                    │
│    43 │   for dist in dists:                                                   │
│ ❱  44 │   │   req = FrozenRequirement.from_dist(dist)                          │
│    45 │   │   if exclude_editable and req.editable:                            │
│    46 │   │   │   continue                                                     │
│    47 │   │   installations[req.canonical_name] = req                          │
│                                                                                │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │             dist = protobuf None                                           │ │
│ │                    (/opt/homebrew/lib/python3.11/site-packages)            │ │
│ │            dists = <generator object                                       │ │
│ │                    BaseEnvironment.iter_installed_distributions.<locals>.… │ │
│ │                    at 0x1065e52a0>                                         │ │
│ │ exclude_editable = None                                                    │ │
│ │    installations = {                                                       │ │
│ │                    │   'appnope': FrozenRequirement(                       │ │
│ │                    │   │   name='appnope',                                 │ │
│ │                    │   │   req='appnope==0.1.3',                           │ │
│ │                    │   │   editable=False,                                 │ │
│ │                    │   │   comments=[]                                     │ │
│ │                    │   ),                                                  │ │
│ │                    │   'wcwidth': FrozenRequirement(                       │ │
│ │                    │   │   name='wcwidth',                                 │ │
│ │                    │   │   req='wcwidth==0.2.6',                           │ │
│ │                    │   │   editable=False,                                 │ │
│ │                    │   │   comments=[]                                     │ │
│ │                    │   ),                                                  │ │
│ │                    │   'decorator': FrozenRequirement(                     │ │
│ │                    │   │   name='decorator',                               │ │
│ │                    │   │   req='decorator==5.1.1',                         │ │
│ │                    │   │   editable=False,                                 │ │
│ │                    │   │   comments=[]                                     │ │
│ │                    │   ),                                                  │ │
│ │                    │   'ptyprocess': FrozenRequirement(                    │ │
│ │                    │   │   name='ptyprocess',                              │ │
│ │                    │   │   req='ptyprocess==0.7.0',                        │ │
│ │                    │   │   editable=False,                                 │ │
│ │                    │   │   comments=[]                                     │ │
│ │                    │   ),                                                  │ │
│ │                    │   'pickleshare': FrozenRequirement(                   │ │
│ │                    │   │   name='pickleshare',                             │ │
│ │                    │   │   req='pickleshare==0.7.5',                       │ │
│ │                    │   │   editable=False,                                 │ │
│ │                    │   │   comments=[]                                     │ │
│ │                    │   ),                                                  │ │
│ │                    │   'stack-data': FrozenRequirement(                    │ │
│ │                    │   │   name='stack-data',                              │ │
│ │                    │   │   req='stack-data==0.6.2',                        │ │
│ │                    │   │   editable=False,                                 │ │
│ │                    │   │   comments=[]                                     │ │
│ │                    │   ),                                                  │ │
│ │                    │   'asttokens': FrozenRequirement(                     │ │
│ │                    │   │   name='asttokens',                               │ │
│ │                    │   │   req='asttokens==2.4.0',                         │ │
│ │                    │   │   editable=False,                                 │ │
│ │                    │   │   comments=[]                                     │ │
│ │                    │   ),                                                  │ │
│ │                    │   'parso': FrozenRequirement(                         │ │
│ │                    │   │   name='parso',                                   │ │
│ │                    │   │   req='parso==0.8.3',                             │ │
│ │                    │   │   editable=False,                                 │ │
│ │                    │   │   comments=[]                                     │ │
│ │                    │   ),                                                  │ │
│ │                    │   'ipython': FrozenRequirement(                       │ │
│ │                    │   │   name='ipython',                                 │ │
│ │                    │   │   req='ipython==8.15.0',                          │ │
│ │                    │   │   editable=False,                                 │ │
│ │                    │   │   comments=[]                                     │ │
│ │                    │   ),                                                  │ │
│ │                    │   'executing': FrozenRequirement(                     │ │
│ │                    │   │   name='executing',                               │ │
│ │                    │   │   req='executing==1.2.0',                         │ │
│ │                    │   │   editable=False,                                 │ │
│ │                    │   │   comments=[]                                     │ │
│ │                    │   ),                                                  │ │
│ │                    │   ... +58                                             │ │
│ │                    }                                                       │ │
│ │         isolated = False                                                   │ │
│ │       local_only = False                                                   │ │
│ │            paths = None                                                    │ │
│ │              req = FrozenRequirement(                                      │ │
│ │                    │   name='openpyxl',                                    │ │
│ │                    │   req='openpyxl==3.1.2',                              │ │
│ │                    │   editable=False,                                     │ │
│ │                    │   comments=[]                                         │ │
│ │                    )                                                       │ │
│ │      requirement = []                                                      │ │
│ │             skip = {                                                       │ │
│ │                    │   'distribute',                                       │ │
│ │                    │   'wheel',                                            │ │
│ │                    │   'argparse',                                         │ │
│ │                    │   'setuptools',                                       │ │
│ │                    │   'pip',                                              │ │
│ │                    │   'wsgiref',                                          │ │
│ │                    │   'python'                                            │ │
│ │                    }                                                       │ │
│ │        user_only = False                                                   │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                │
│ /opt/homebrew/lib/python3.11/site-packages/pip/_internal/operations/freeze.py: │
│ 248 in from_dist                                                               │
│                                                                                │
│   245 │   │   │   │   req = direct_url_as_pep440_direct_reference(direct_url,  │
│   246 │   │   │   else:                                                        │
│   247 │   │   │   │   # name==version requirement                              │
│ ❱ 248 │   │   │   │   req = _format_as_name_version(dist)                      │
│   249 │   │                                                                    │
│   250 │   │   return cls(dist.raw_name, req, editable, comments=comments)      │
│   251                                                                          │
│                                                                                │
│ ╭──────────────────────────────── locals ─────────────────────────────────╮    │
│ │   comments = []                                                         │    │
│ │ direct_url = None                                                       │    │
│ │       dist = protobuf None (/opt/homebrew/lib/python3.11/site-packages) │    │
│ │   editable = False                                                      │    │
│ ╰─────────────────────────────────────────────────────────────────────────╯    │
│                                                                                │
│ /opt/homebrew/lib/python3.11/site-packages/pip/_internal/operations/freeze.py: │
│ 150 in _format_as_name_version                                                 │
│                                                                                │
│   147                                                                          │
│   148 def _format_as_name_version(dist: BaseDistribution) -> str:              │
│   149 │   try:                                                                 │
│ ❱ 150 │   │   dist_version = dist.version                                      │
│   151 │   except InvalidVersion:                                               │
│   152 │   │   # legacy version                                                 │
│   153 │   │   return f"{dist.raw_name}==={dist.raw_version}"                   │
│                                                                                │
│ ╭───────────────────────────── locals ──────────────────────────────╮          │
│ │ dist = protobuf None (/opt/homebrew/lib/python3.11/site-packages) │          │
│ ╰───────────────────────────────────────────────────────────────────╯          │
│                                                                                │
│ /opt/homebrew/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_d │
│ ists.py:175 in version                                                         │
│                                                                                │
│   172 │   def version(self) -> Version:                                        │
│   173 │   │   if version := parse_name_and_version_from_info_directory(self._d │
│   174 │   │   │   return parse_version(version)                                │
│ ❱ 175 │   │   return parse_version(self._dist.version)                         │
│   176 │                                                                        │
│   177 │   @property                                                            │
│   178 │   def raw_version(self) -> str:                                        │
│                                                                                │
│ ╭─────────────────────────────── locals ───────────────────────────────╮       │
│ │    self = protobuf None (/opt/homebrew/lib/python3.11/site-packages) │       │
│ │ version = None                                                       │       │
│ ╰──────────────────────────────────────────────────────────────────────╯       │
│                                                                                │
│ /opt/homebrew/lib/python3.11/site-packages/pip/_vendor/packaging/version.py:56 │
│ in parse                                                                       │
│                                                                                │
│    53 │   :param version: The version string to parse.                         │
│    54 │   :raises InvalidVersion: When the version string is not a valid versi │
│    55 │   """                                                                  │
│ ❱  56 │   return Version(version)                                              │
│    57                                                                          │
│    58                                                                          │
│    59 class InvalidVersion(ValueError):                                        │
│                                                                                │
│ ╭──── locals ────╮                                                             │
│ │ version = None │                                                             │
│ ╰────────────────╯                                                             │
│                                                                                │
│ /opt/homebrew/lib/python3.11/site-packages/pip/_vendor/packaging/version.py:20 │
│ 0 in __init__                                                                  │
│                                                                                │
│   197 │   │   """                                                              │
│   198 │   │                                                                    │
│   199 │   │   # Validate the version and parse it into pieces                  │
│ ❱ 200 │   │   match = self._regex.search(version)                              │
│   201 │   │   if not match:                                                    │
│   202 │   │   │   raise InvalidVersion(f"Invalid version: {version!r}")        │
│   203                                                                          │
│                                                                                │
│ ╭─────────────────────────────── locals ────────────────────────────────╮      │
│ │    self = <repr-error "'Version' object has no attribute '_version'"> │      │
│ │ version = None                                                        │      │
│ ╰───────────────────────────────────────────────────────────────────────╯      │
╰────────────────────────────────────────────────────────────────────────────────╯
TypeError: expected string or bytes-like object, got 'NoneType'

@AndreeaPocol
Copy link

AndreeaPocol commented Feb 19, 2025

As the stack trace shows and @ichard26 aptly noticed offline, dist = protobuf None is problematic due to the missing version. Uninstalling the protobuf package solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: awaiting response Waiting for a response/more information type: support User Support
Projects
None yet
Development

No branches or pull requests

4 participants