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

HTTPError and TypeError with pip-check installed by pip3 #23

Closed
Nairwolf opened this issue Sep 3, 2019 · 2 comments
Closed

HTTPError and TypeError with pip-check installed by pip3 #23

Nairwolf opened this issue Sep 3, 2019 · 2 comments

Comments

@Nairwolf
Copy link

Nairwolf commented Sep 3, 2019

Hi,

I am using pip-check installed with pip3. I'm running currently this command pip-check -c /usr/bin/pip3 and I receive this :

Loading package versions...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 140, in run
    packages = self.get_uptodate(packages, options)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 155, in get_uptodate
    dist for dist in self.iter_packages_latest_infos(packages, options)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 155, in <listcomp>
    dist for dist in self.iter_packages_latest_infos(packages, options)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 184, in iter_packages_latest_infos
    all_candidates = finder.find_all_candidates(dist.key)
  File "/usr/lib/python3/dist-packages/pip/_internal/index.py", line 530, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/lib/python3/dist-packages/pip/_internal/index.py", line 675, in _get_pages
    page = self._get_page(location)
  File "/usr/lib/python3/dist-packages/pip/_internal/index.py", line 793, in _get_page
    return _get_html_page(link, session=self.session)
  File "/usr/lib/python3/dist-packages/pip/_internal/index.py", line 147, in _get_html_page
    resp.raise_for_status()
  File "/usr/share/python-wheels/requests-2.21.0-py2.py3-none-any.whl/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/unattended-upgrades/

And effectively the link https://pypi.org/simple/unattended-upgrades/ returns a 404 error. So is there an error from the Pypi side, or is related to pip-check ?

Moreover, if I'm running pip-check -c /usr/bin/pip3 -U, I receive this :

Loading package versions...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 138, in run
    packages = self.get_outdated(packages, options)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 149, in get_outdated
    dist for dist in self.iter_packages_latest_infos(packages, options)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 150, in <listcomp>
    if dist.latest_version > dist.parsed_version
TypeError: '>' not supported between instances of 'Version' and 'Version'

Is it related to my installation ? With pip3, I've installed pip-check 2.5.2. I don't have any pip binary installed, only pip3 which is under /usr/bin/pip3 and in my PATH.

Is it related to the option -c ?

@bartTC
Copy link
Owner

bartTC commented Nov 8, 2019

Your -c looks correct to me. The traceback is raised by pip, not pip-check.

  File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 150, in <listcomp>
    if dist.latest_version > dist.parsed_version
TypeError: '>' not supported between instances of 'Version' and 'Version'

Does this still happen when you update pip itself?

@bartTC
Copy link
Owner

bartTC commented Nov 8, 2019

pypa/pip#5429 looks related.

The issue is fixed since pip 19.1 (commit 8ef3283, specifically). ...

@bartTC bartTC closed this as completed Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants