add-apt-repository crashed with AttributeError in _get_https_content_py3(): 'InvalidURL' object has no attribute 'reason'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
software-properties (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Release: 20.04 Ubuntu Focal Fossa (development branch)
Package/Program: add-apt-repository
Command:
$ sudo add-apt-repository --remove ppa:"deb [arch=amd64] https:/
Expected response:
Either to get the ppa removed or the exception handled with a message "unable to find the URL"
What happened instead:
The traceback of an exception was printed in the terminal.
Traceback:
Traceback (most recent call last):
File "/usr/lib/
lp_page = urllib.
File "/usr/lib/
return opener.open(url, data, timeout)
File "/usr/lib/
response = self._open(req, data)
File "/usr/lib/
result = self._call_
File "/usr/lib/
result = func(*args)
File "/usr/lib/
return self.do_
File "/usr/lib/
h.request(
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
raise InvalidURL(f"URL can't contain control characters. {url!r} "
http.client.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/
ret = get_ppa_
File "/usr/lib/
return get_info_
File "/usr/lib/
return get_info_
File "/usr/lib/
data = func(lp_url=url, accept_
File "/usr/lib/
"Error reading %s (%d tries): %s" % (lp_url, trynum, e.reason),
AttributeError: 'InvalidURL' object has no attribute 'reason'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/
lp_page = urllib.
File "/usr/lib/
return opener.open(url, data, timeout)
File "/usr/lib/
response = self._open(req, data)
File "/usr/lib/
result = self._call_
File "/usr/lib/
result = func(*args)
File "/usr/lib/
return self.do_
File "/usr/lib/
h.request(
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
raise InvalidURL(f"URL can't contain control characters. {url!r} "
http.client.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/
shortcut = shortcut_
File "/usr/lib/
ret = factory(shortcut)
File "/usr/lib/
return PPAShortcutHand
File "/usr/lib/
info = get_ppa_
File "/usr/lib/
_get_
File "/usr/lib/
lp_user = get_info_
File "/usr/lib/
return get_info_
File "/usr/lib/
data = func(lp_url=url, accept_
File "/usr/lib/
"Error reading %s (%d tries): %s" % (lp_url, trynum, e.reason),
AttributeError: 'InvalidURL' object has no attribute 'reason'
ProblemType: Crash
DistroRelease: Ubuntu 20.04
Package: software-
ProcVersionSign
Uname: Linux 5.4.0-21-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu22
Architecture: amd64
Date: Mon Apr 6 01:38:30 2020
ExecutablePath: /usr/bin/
InstallationDate: Installed on 2020-04-05 (0 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Beta amd64 (20200401)
InterpreterPath: /usr/bin/python3.8
PackageArchitec
ProcCmdline: /usr/bin/python3 /usr/bin/
ProcEnviron:
LANGUAGE=en_GB:en
LANG=en_GB.UTF-8
TERM=xterm-
PATH=(custom, no user)
SHELL=/bin/bash
Python3Details: /usr/bin/python3.8, Python 3.8.2, python3-minimal, 3.8.2-0ubuntu2
PythonArgs: ['/usr/
PythonDetails: N/A
SourcePackage: software-properties
Title: add-apt-repository crashed with AttributeError in _get_https_
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:
tags: | removed: need-duplicate-check |
Changed in software-properties (Ubuntu): | |
importance: | Undecided → Medium |
Thank you for your bug report. The command should take the name of the ppa to remove, how did you use it exactly?