AttributeError: 'NoneType' object has no attribute 'is_hash_allowed'
See original GitHub issueEnvironment
- pip version: 19.2
- Python version: 3.6.8
- OS: Mac OSX (Darwin Kernel Version 18.6.0)
Description I made env update in my project including pip as well. After that I wanted to check outdated packages with command:
pip list --outdated --format=columns
After that exception was raised.
Expected behavior I expected list of packages or empty list.
How to Reproduce
- Get the newest version of package from PyPI.
- Then run
pip list --outdated --format=columns
- An error occurs.
Output
(env) project (develop) $ pip list --outdated --format=columns
ERROR: Exception:
Traceback (most recent call last):
File "/project/env/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 188, in main
status = self.run(options, args)
File "/project/env/lib/python3.6/site-packages/pip/_internal/commands/list.py", line 156, in run
packages = self.get_outdated(packages, options)
File "/project/env/lib/python3.6/site-packages/pip/_internal/commands/list.py", line 164, in get_outdated
dist for dist in self.iter_packages_latest_infos(packages, options)
File "/project/env/lib/python3.6/site-packages/pip/_internal/commands/list.py", line 164, in <listcomp>
dist for dist in self.iter_packages_latest_infos(packages, options)
File "/project/env/lib/python3.6/site-packages/pip/_internal/commands/list.py", line 195, in iter_packages_latest_infos
best_candidate = evaluator.get_best_candidate(all_candidates)
File "/project/env/lib/python3.6/site-packages/pip/_internal/index.py", line 729, in get_best_candidate
best_candidate = max(candidates, key=self._sort_key)
File "/project/env/lib/python3.6/site-packages/pip/_internal/index.py", line 710, in _sort_key
has_allowed_hash = int(link.is_hash_allowed(self._hashes))
File "/project/env/lib/python3.6/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'
Issue Analytics
- State:
- Created 4 years ago
- Reactions:40
- Comments:18 (12 by maintainers)
Top Results From Across the Web
Why do I get AttributeError: 'NoneType' object has no attribute ...
NoneType means that instead of an instance of whatever Class or Object you think you're working with, you've actually got None .
Read more >AttributeError: 'NoneType' object has no attribute 'version_tuple
On CS9 pipeline, Container Build and Image build jobs are failing with following errors: ``` TASK [oooci-build-images : Create temp venv w/ ...
Read more >Attribute error:'NoneType' object has no attribute
spatialReference.Name >>> print dsc. i'm getting following error at line 5. Attributeerror:'NoneType' object has no attribute Name.
Read more >AttributeError: 'NoneType' object has no attribute 'ema_scope'
AttributeError : 'NoneType' object has no attribute 'ema_scope'. I have the Automatic1111 webui do a git pull everytime I run it.
Read more >AttributeError: 'NoneType' object has no attribute 'getReleases'
Hi there, I am currently trying to get my experiment to integrate with our Biopac shock hardware via parallel port. I am running...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The fix is in master. I’ll do the release in a bit – getting a bit of rest after a long day today.
The release with this bug-fix has been uploaded. Thanks everyone (and especially @cjerdonek)! 😃