"An error occured while performing the above command" when quitting via 'q'
zombiepigdragon opened this issue · comments
Alex Rawson commented
When attempting to cancel the upgrade by pressing 'q' when prompted, the error handler catches it and displays
Do you wish to update 1 package? [Y/n/q]: q
Traceback (most recent call last):
File "/home/zpd/.local/lib/python3.9/site-packages/pipupgrade/commands/__init__.py", line 75, in command
return _command(**ARGUMENTS)
File "/home/zpd/.local/lib/python3.9/site-packages/pipupgrade/commands/__init__.py", line 214, in _command
update_registry(registry, yes = a.yes, user = a.user, check = a.check,
File "/home/zpd/.local/lib/python3.9/site-packages/pipupgrade/commands/helper.py", line 275, in update_registry
if npackages and (yes or interactive or cli.confirm(query, quit_ = True)):
File "/home/zpdlocal/lib/python3.9/site-packages/pipupgrade/cli/util.py", line 50, in confirm
sys.exit(EX_OK)
SystemExit: 0
An error occured while performing the above command. This could be an issue with
"pipupgrade". Kindly post an issue at https://github.com/achillesrasquinha/pipupgrade/issues
This should be easily fixed by not showing the error for SystemExit exceptions.
Achilles Rasquinha commented
Could you post the entire log out here? Please check the Bug Report
template.
Alex Rawson commented
2021-01-20 09:23:10,847 | INFO | Environment: {'version': '1.8.2', 'python_version': '3.9.1', 'os': 'Linux-5.4.90-1-lts-x86_64-with-glibc2.32', 'config': {'path': {'BASE': '/home/zpd/.local/lib/python3.9/site-packages/pipupgrade', 'DATA': '/home/zpd/.local/lib/python3.9/site-packages/pipupgrade/data', 'CACHE': '/home/zpd/.config/pipupgrade'}}, 'settings': {'settings': {'version': '1.8.0', 'cache_timeout': '86400', 'jobs': '8'}}}
2021-01-20 09:23:10,847 | INFO | Arguments Passed: {'args': (), 'kwargs': {'ARGUMENTS': <class 'inspect._empty'>, 'packages': [], 'ignore': None, 'pip_path': None, 'yes': 0, 'check': 0, 'upgrade_type': ['minor', 'patch'], 'latest': 0, 'format': 'table', 'all': 0, 'pip': 0, 'self': False, 'requirements': None, 'pipfile': None, 'interactive': 0, 'project': None, 'git_username': None, 'git_email': None, 'pull_request': False, 'github_access_token': None, 'github_reponame': None, 'github_username': None, 'target_branch': 'master', 'jobs': 8, 'user': 0, 'no_included_requirements': 0, 'no_cache': 0, 'output': None, 'ignore_error': 0, 'force': 0, 'no_color': 0, 'verbose': True}, 'a': <pipupgrade.to_params.<locals>.O object at 0x7f3a61ff35e0>}
Checking...
2021-01-20 09:23:10,848 | INFO | `pip` executables found: ['/usr/bin/pip', '/usr/bin/pip3']
2021-01-20 09:23:10,848 | INFO | Using 8 jobs...
2021-01-20 09:23:10,860 | INFO | Fetching installed packages for /usr/bin/pip...
2021-01-20 09:23:10,860 | INFO | Fetching installed packages for /usr/bin/pip3...
2021-01-20 09:23:10,860 | INFO | Executing command: /usr/bin/pip list --outdated --format json
2021-01-20 09:23:10,860 | INFO | Executing command: /usr/bin/pip3 list --outdated --format json
2021-01-20 09:23:14,204 | INFO | 4 packages found for /usr/bin/pip.
2021-01-20 09:23:14,214 | INFO | Initializing Package {'name': 'greenlet', 'version': '0.4.17', 'latest_version': '1.0.0', 'latest_filetype': 'wheel'} of type <class 'dict'>...
2021-01-20 09:23:14,214 | INFO | Initializing Package {'name': 'libvirt-python', 'version': '6.10.0', 'latest_version': '7.0.0', 'latest_filetype': 'sdist'} of type <class 'dict'>...
2021-01-20 09:23:14,214 | INFO | Fetching package greenlet information from DB...
2021-01-20 09:23:14,214 | INFO | Initializing Package {'name': 'pip', 'version': '20.2.4', 'latest_version': '20.3.3', 'latest_filetype': 'wheel'} of type <class 'dict'>...
2021-01-20 09:23:14,214 | INFO | Fetching package libvirt-python information from DB...
2021-01-20 09:23:14,214 | INFO | Initializing Package {'name': 'chardet', 'version': '3.0.4', 'latest_version': '4.0.0', 'latest_filetype': 'wheel'} of type <class 'dict'>...
2021-01-20 09:23:14,214 | INFO | Fetching package pip information from DB...
2021-01-20 09:23:14,214 | INFO | Fetching package chardet information from DB...
2021-01-20 09:23:14,216 | INFO | Using cached info for package <Package libvirt-python (6.10.0)>.
2021-01-20 09:23:14,216 | INFO | Using cached info for package <Package pip (20.2.4)>.
2021-01-20 09:23:14,216 | INFO | Using cached info for package <Package greenlet (0.4.17)>.
2021-01-20 09:23:14,216 | INFO | Using cached info for package <Package chardet (3.0.4)>.
2021-01-20 09:23:14,218 | INFO | Packages within `pip` /usr/bin/pip found: [<Package chardet (3.0.4)>, <Package greenlet (0.4.17)>, <Package libvirt-python (6.10.0)>, <Package pip (20.2.4)>]...
2021-01-20 09:23:14,246 | INFO | 4 packages found for /usr/bin/pip3.
2021-01-20 09:23:14,251 | INFO | Initializing Package {'name': 'chardet', 'version': '3.0.4', 'latest_version': '4.0.0', 'latest_filetype': 'wheel'} of type <class 'dict'>...
2021-01-20 09:23:14,251 | INFO | Initializing Package {'name': 'greenlet', 'version': '0.4.17', 'latest_version': '1.0.0', 'latest_filetype': 'wheel'} of type <class 'dict'>...
2021-01-20 09:23:14,251 | INFO | Fetching package chardet information from DB...
2021-01-20 09:23:14,252 | INFO | Fetching package greenlet information from DB...
2021-01-20 09:23:14,251 | INFO | Initializing Package {'name': 'libvirt-python', 'version': '6.10.0', 'latest_version': '7.0.0', 'latest_filetype': 'sdist'} of type <class 'dict'>...
2021-01-20 09:23:14,251 | INFO | Initializing Package {'name': 'pip', 'version': '20.2.4', 'latest_version': '20.3.3', 'latest_filetype': 'wheel'} of type <class 'dict'>...
2021-01-20 09:23:14,252 | INFO | Fetching package libvirt-python information from DB...
2021-01-20 09:23:14,252 | INFO | Fetching package pip information from DB...
2021-01-20 09:23:14,254 | INFO | Using cached info for package <Package chardet (3.0.4)>.
2021-01-20 09:23:14,254 | INFO | Using cached info for package <Package libvirt-python (6.10.0)>.
2021-01-20 09:23:14,254 | INFO | Using cached info for package <Package pip (20.2.4)>.
2021-01-20 09:23:14,254 | INFO | Using cached info for package <Package greenlet (0.4.17)>.
2021-01-20 09:23:14,256 | INFO | Packages within `pip` /usr/bin/pip3 found: [<Package chardet (3.0.4)>, <Package greenlet (0.4.17)>, <Package libvirt-python (6.10.0)>, <Package pip (20.2.4)>]...
2021-01-20 09:23:14,257 | INFO | Updating registries: [<pipupgrade.model.registry.Registry object at 0x7f3a608d5d30>, <pipupgrade.model.registry.Registry object at 0x7f3a60886d00>]...
Source: Installed Distributions (/usr/bin/pip)
Name Current Version Latest Version Home Page
-------------- --------------- -------------- ----------------------------------
chardet 3.0.4 4.0.0 https://github.com/chardet/chardet
greenlet 0.4.17 1.0.0 https://greenlet.readthedocs.io/
libvirt-python 6.10.0 7.0.0 http://www.libvirt.org
pip 20.2.4 20.3.3 https://pip.pypa.io/
Do you wish to update 1 package? [Y/n/q]: q
Traceback (most recent call last):
File "/home/zpd/.local/lib/python3.9/site-packages/pipupgrade/commands/__init__.py", line 75, in command
return _command(**ARGUMENTS)
File "/home/zpd/.local/lib/python3.9/site-packages/pipupgrade/commands/__init__.py", line 214, in _command
update_registry(registry, yes = a.yes, user = a.user, check = a.check,
File "/home/zpd/.local/lib/python3.9/site-packages/pipupgrade/commands/helper.py", line 275, in update_registry
if npackages and (yes or interactive or cli.confirm(query, quit_ = True)):
File "/home/zpd.local/lib/python3.9/site-packages/pipupgrade/cli/util.py", line 50, in confirm
sys.exit(EX_OK)
SystemExit: 0
An error occured while performing the above command. This could be an issue with
"pipupgrade". Kindly post an issue at https://github.com/achillesrasquinha/pipupgrade/issues
Achilles Rasquinha commented
Fixed and Released!