Skip to content

pip 19.2 "pip list -o" raises AttributeError #6778

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

Closed
hobbsd opened this issue Jul 23, 2019 · 1 comment
Closed

pip 19.2 "pip list -o" raises AttributeError #6778

hobbsd opened this issue Jul 23, 2019 · 1 comment
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR

Comments

@hobbsd
Copy link

hobbsd commented Jul 23, 2019

Environment

  • pip version: 19.2
  • Python version: 3.7.2 64-bit
  • OS: Window 10

Description
Running pip list -o raises unhandled AttributeError.

How to Reproduce

  1. Upgrade pip with python -m pip install -U pip
  2. Then run python -m pip list -o
  3. An error occurs.

Output

ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\username\py_envs\projectname\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in main
    status = self.run(options, args)
  File "C:\Users\username\py_envs\projectname\lib\site-packages\pip\_internal\commands\list.py", line 156, in run
    packages = self.get_outdated(packages, options)
  File "C:\Users\username\py_envs\projectname\lib\site-packages\pip\_internal\commands\list.py", line 164, in get_outdated
    dist for dist in self.iter_packages_latest_infos(packages, options)
  File "C:\Users\username\py_envs\projectname\lib\site-packages\pip\_internal\commands\list.py", line 164, in <listcomp>
    dist for dist in self.iter_packages_latest_infos(packages, options)
  File "C:\Users\username\py_envs\projectname\lib\site-packages\pip\_internal\commands\list.py", line 195, in iter_packages_latest_infos
    best_candidate = evaluator.get_best_candidate(all_candidates)
  File "C:\Users\username\py_envs\projectname\lib\site-packages\pip\_internal\index.py", line 729, in get_best_candidate
    best_candidate = max(candidates, key=self._sort_key)
  File "C:\Users\username\py_envs\projectname\lib\site-packages\pip\_internal\index.py", line 710, in _sort_key
    has_allowed_hash = int(link.is_hash_allowed(self._hashes))
  File "C:\Users\username\py_envs\projectname\lib\site-packages\pip\_internal\models\link.py", line 213, in is_hash_allowed
    return hashes.is_hash_allowed(self.hash_name, hex_digest=self.hash)
AttributeError: 'NoneType' object has no attribute 'is_hash_allowed'
@ghost ghost added the S: needs triage Issues/PRs that need to be triaged label Jul 23, 2019
@pradyunsg
Copy link
Member

Please see #6772.

@chrahunt chrahunt added the resolution: duplicate Duplicate of an existing issue/PR label Jul 24, 2019
@ghost ghost removed the S: needs triage Issues/PRs that need to be triaged label Jul 24, 2019
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Aug 23, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

3 participants