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/python3/dist-packages/softwareproperties/ppa.py", line 138, in _get_https_content_py3
lp_page = urllib.request.urlopen(request,
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 1362, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/lib/python3.8/urllib/request.py", line 1319, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.8/http/client.py", line 1230, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1241, in _send_request
self.putrequest(method, url, **skips)
File "/usr/lib/python3.8/http/client.py", line 1092, in putrequest
self._validate_path(url)
File "/usr/lib/python3.8/http/client.py", line 1183, in _validate_path
raise InvalidURL(f"URL can't contain control characters. {url!r} "
http.client.InvalidURL: URL can't contain control characters. '/api/devel/~deb [arch=amd64] https/+archive/ubuntu/ppa' (found at least ' ')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 380, in get_ppa_info
ret = get_ppa_info_from_lp(user, ppa)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 110, in get_ppa_info_from_lp
return get_info_from_lp(lp_url)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 104, in get_info_from_lp
return get_info_from_https(lp_url, True)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 96, in get_info_from_https
data = func(lp_url=url, accept_json=accept_json, retry_delays=retry_delays)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 143, in _get_https_content_py3
"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/python3/dist-packages/softwareproperties/ppa.py", line 138, in _get_https_content_py3
lp_page = urllib.request.urlopen(request,
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 1362, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/lib/python3.8/urllib/request.py", line 1319, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.8/http/client.py", line 1230, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1241, in _send_request
self.putrequest(method, url, **skips)
File "/usr/lib/python3.8/http/client.py", line 1092, in putrequest
self._validate_path(url)
File "/usr/lib/python3.8/http/client.py", line 1183, in _validate_path
raise InvalidURL(f"URL can't contain control characters. {url!r} "
http.client.InvalidURL: URL can't contain control characters. '/api/1.0/~deb [arch=amd64] https' (found at least ' ')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 136, in <module>
shortcut = shortcut_handler(line)
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 871, in shortcut_handler
ret = factory(shortcut)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 469, in shortcut_handler
return PPAShortcutHandler(shortcut)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 426, in __init__
info = get_ppa_info(self.shortcut)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 392, in get_ppa_info
_get_suggested_ppa_message(user, ppa))
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 349, in _get_suggested_ppa_message
lp_user = get_info_from_lp(LAUNCHPAD_USER_API % user)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 104, in get_info_from_lp
return get_info_from_https(lp_url, True)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 96, in get_info_from_https
data = func(lp_url=url, accept_json=accept_json, retry_delays=retry_delays)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 143, in _get_https_content_py3
"Error reading %s (%d tries): %s" % (lp_url, trynum, e.reason),
AttributeError: 'InvalidURL' object has no attribute 'reason'
Release: 20.04 Ubuntu Focal Fossa (development branch)
Package/Program: add-apt-repository
Command: add-apt-repository --remove
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: python3/ dist-packages/ softwarepropert ies/ppa. py", line 138, in _get_https_ content_ py3 request. urlopen( request, python3. 8/urllib/ request. py", line 222, in urlopen python3. 8/urllib/ request. py", line 525, in open python3. 8/urllib/ request. py", line 542, in _open chain(self. handle_ open, protocol, protocol + python3. 8/urllib/ request. py", line 502, in _call_chain python3. 8/urllib/ request. py", line 1362, in https_open open(http. client. HTTPSConnection , req, python3. 8/urllib/ request. py", line 1319, in do_open req.get_ method( ), req.selector, req.data, headers, python3. 8/http/ client. py", line 1230, in request _send_request( method, url, body, headers, encode_chunked) python3. 8/http/ client. py", line 1241, in _send_request putrequest( method, url, **skips) python3. 8/http/ client. py", line 1092, in putrequest _validate_ path(url) python3. 8/http/ client. py", line 1183, in _validate_path InvalidURL: URL can't contain control characters. '/api/devel/~deb [arch=amd64] https/+ archive/ ubuntu/ ppa' (found at least ' ')
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): python3/ dist-packages/ softwarepropert ies/ppa. py", line 380, in get_ppa_info info_from_ lp(user, ppa) python3/ dist-packages/ softwarepropert ies/ppa. py", line 110, in get_ppa_ info_from_ lp from_lp( lp_url) python3/ dist-packages/ softwarepropert ies/ppa. py", line 104, in get_info_from_lp from_https( lp_url, True) python3/ dist-packages/ softwarepropert ies/ppa. py", line 96, in get_info_from_https json=accept_ json, retry_delays= retry_delays) python3/ dist-packages/ softwarepropert ies/ppa. py", line 143, in _get_https_ content_ py3
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): python3/ dist-packages/ softwarepropert ies/ppa. py", line 138, in _get_https_ content_ py3 request. urlopen( request, python3. 8/urllib/ request. py", line 222, in urlopen python3. 8/urllib/ request. py", line 525, in open python3. 8/urllib/ request. py", line 542, in _open chain(self. handle_ open, protocol, protocol + python3. 8/urllib/ request. py", line 502, in _call_chain python3. 8/urllib/ request. py", line 1362, in https_open open(http. client. HTTPSConnection , req, python3. 8/urllib/ request. py", line 1319, in do_open req.get_ method( ), req.selector, req.data, headers, python3. 8/http/ client. py", line 1230, in request _send_request( method, url, body, headers, encode_chunked) python3. 8/http/ client. py", line 1241, in _send_request putrequest( method, url, **skips) python3. 8/http/ client. py", line 1092, in putrequest _validate_ path(url) python3. 8/http/ client. py", line 1183, in _validate_path InvalidURL: URL can't contain control characters. '/api/1.0/~deb [arch=amd64] https' (found at least ' ')
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): add-apt- repository" , line 136, in <module> handler( line) python3/ dist-packages/ softwarepropert ies/SoftwarePro perties. py", line 871, in shortcut_handler python3/ dist-packages/ softwarepropert ies/ppa. py", line 469, in shortcut_handler ler(shortcut) python3/ dist-packages/ softwarepropert ies/ppa. py", line 426, in __init__ info(self. shortcut) python3/ dist-packages/ softwarepropert ies/ppa. py", line 392, in get_ppa_info suggested_ ppa_message( user, ppa)) python3/ dist-packages/ softwarepropert ies/ppa. py", line 349, in _get_suggested_ ppa_message from_lp( LAUNCHPAD_ USER_API % user) python3/ dist-packages/ softwarepropert ies/ppa. py", line 104, in get_info_from_lp from_https( lp_url, True) python3/ dist-packages/ softwarepropert ies/ppa. py", line 96, in get_info_from_https json=accept_ json, retry_delays= retry_delays) python3/ dist-packages/ softwarepropert ies/ppa. py", line 143, in _get_https_ content_ py3
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 properties- common 0.98.7 ature: Ubuntu 5.4.0-21.25-generic 5.4.27 dules: nvidia_modeset nvidia add-apt- repository ture: all add-apt- repository --remove ppa:deb\ [arch=amd64]\ https:/ /download. docker. com/linux/ ubuntu\ focal\ stable 256color bin/add- apt-repository' , '--remove', 'ppa:deb [arch=amd64] https:/ /download. docker. com/linux/ ubuntu focal stable'] content_ py3(): 'InvalidURL' object has no attribute 'reason'
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: