question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashes if pip-upgrader exists in requirements.txt

See original GitHub issue
% pip-upgrader
<snip>
Traceback (most recent call last):
  File "/home/username/.virtualenvs/venv/bin/pip-upgrade", line 11, in <module>
    sys.exit(main())
  File "/home/username/.virtualenvs/venv/lib/python3.5/site-packages/pip_upgrader/cli.py", line 70, in main
    packages, options.get('--use-default-index')).detect_available_upgrades(options)
  File "/home/username/.virtualenvs/venv/lib/python3.5/site-packages/pip_upgrader/packages_status_detector.py", line 126, in detect_available_upgrades
    package_status, reason = self._fetch_index_package_info(package_name, current_version)
  File "/home/username/.virtualenvs/venv/lib/python3.5/site-packages/pip_upgrader/packages_status_detector.py", line 167, in _fetch_index_package_info
    return self._parse_simple_html_package_info(package_name, current_version, response)
  File "/home/username/.virtualenvs/venv/lib/python3.5/site-packages/pip_upgrader/packages_status_detector.py", line 228, in _parse_simple_html_package_info
    latest_version = max([vers for vers in all_versions if not vers.is_prerelease and not vers.is_postrelease])
ValueError: max() arg is an empty sequence
% pip-upgrade --version
1.4.0
% python --version
Python 3.5.3

You might not want to support running pip-upgrader on itself, but I don’t think the app should crash because someone has put it in requirements.txt.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
simioncommented, Jun 20, 2017

You’re right, right now the upgrader does not fallback to pypi when a package is not found.

To be fixed in next release 😉

0reactions
eddie-dunncommented, Jul 4, 2017

Do you know what Artifactory is? It’s a commercial paid for product. I’m not sure you need Artifactory to test the issue, but there’s a free trial here: https://www.jfrog.com/artifactory/free-trial/

Maybe a regular private package index would be enough to test it, without having to deal with Artifactory.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · simion/pip-upgrader - GitHub
An interactive pip requirements upgrader. It also updates the version in your requirements.txt file. - Issues · simion/pip-upgrader.
Read more >
Stop pip from failing on single package when installing with ...
txt command will fail if any of the packages listed in the requirements.txt fail to install. Is there any argument I can pass...
Read more >
pip-upgrader - PyPI
txt file. Purpose. This cli tools helps you interactively(or not) upgrade packages from requirements file, and also update the pinned version from requirements...
Read more >
Python 3 Migration Process - Sovankiry - Medium
This article will briefly guide you through the process you need to know to migrate your application code from Python 2 to Python...
Read more >
pip Documentation
you install, and if “helloworld” is present, write a requirements file to use ... pip wheel --wheel-dir=/local/wheels -r requirements.txt.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found