<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
I’m deploying some legacy projects that need Python 3.7 in Ubuntu 22.04.
<div class="ContentPasted0"><br>
</div>
<div class="ContentPasted0 elementToProof"><br>
</div>
When I try to add the repository I get the following error:<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0 ContentPasted1 ContentPasted2">
sudo add-apt-repository ppa:deadsnakes/ppa -y
<div class="ContentPasted1">Traceback (most recent call last):</div>
<div class="ContentPasted1">  File "/usr/bin/add-apt-repository", line 364, in <module></div>
<div class="ContentPasted1">    sys.exit(0 if addaptrepo.main() else 1)</div>
<div class="ContentPasted1">  File "/usr/bin/add-apt-repository", line 347, in main</div>
<div class="ContentPasted1">    shortcut = handler(source, **shortcut_params)</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 40, in shortcut_handler</div>
<div class="ContentPasted1">    return handler(shortcut, **kwargs)</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 82, in __init__</div>
<div class="ContentPasted1">    if self.lpppa.publish_debug_symbols:</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 120, in lpppa</div>
<div class="ContentPasted1">    self._lpppa = self.lpteam.getPPAByName(name=self.ppaname)</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 107, in lpteam</div>
<div class="ContentPasted1">    self._lpteam = self.lp.people(self.teamname)</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 98, in lp</div>
<div class="ContentPasted1">    self._lp = login_func("%s.%s" % (self.__module__, self.__class__.__name__),</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 494, in login_anonymously</div>
<div class="ContentPasted1">    return cls(</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 230, in __init__</div>
<div class="ContentPasted1">    super(Launchpad, self).__init__(</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 472, in __init__</div>
<div class="ContentPasted1">    self._wadl = self._browser.get_wadl_application(self._root_uri)</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 447, in get_wadl_application</div>
<div class="ContentPasted1">    response, content = self._request(url, media_type=wadl_type)</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 389, in _request</div>
<div class="ContentPasted1">    response, content = self._request_and_retry(</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 359, in _request_and_retry</div>
<div class="ContentPasted1">    response, content = self._connection.request(</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1725, in request</div>
<div class="ContentPasted1">    (response, content) = self._request(</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 144, in _request</div>
<div class="ContentPasted1">    response, content = super(LaunchpadOAuthAwareHttp, self)._request(</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 184, in _request</div>
<div class="ContentPasted1">    return super(RestfulHttp, self)._request(</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1441, in _request</div>
<div class="ContentPasted1">    (response, content) = self._conn_request(conn, request_uri, method, body, headers)</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1363, in _conn_request</div>
<div class="ContentPasted1">    conn.connect()</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1153, in connect</div>
<div class="ContentPasted1">    sock.connect((self.host, self.port))</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/httplib2/socks.py", line 504, in connect</div>
<div class="ContentPasted1">    self.__negotiatehttp(destpair[0], destpair[1])</div>
<div class="ContentPasted1">  File "/usr/lib/python3/dist-packages/httplib2/socks.py", line 465, in __negotiatehttp</div>
<div class="ContentPasted1">    raise HTTPError((statuscode, statusline[2]))</div>
<div class="ContentPasted1">httplib2.socks.HTTPError: (403, b'Forbidden')</div>
<br>
I tried to update the library but the problem persists. python3 -m pip install --upgrade httplib2<br>
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0 ContentPasted1">
Any helps?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted0">
<br>
</div>
</body>
</html>