I tried rebuilding locally (using base18), installed the snap and tried again, but it failed with the same error.
I managed to find a way to reproduce the problem easily from within the snap using python3
:
$ snap run --shell qabro
$ python3 # Run python interpreter from within the snap
Then:
>>> from launchpadlib.launchpad import Launchpad
>>> launchpad = Launchpad.login_anonymously('just testing', 'staging', version='devel')
>>> # For some reason, login_anonymously() works, but...
>>> launchpad = Launchpad.login_with('just testing', 'staging')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/snap/qabro/x1/lib/python3.6/site-packages/launchpadlib/launchpad.py", line 568, in login_with
credential_save_failed, version)
File "/snap/qabro/x1/lib/python3.6/site-packages/launchpadlib/launchpad.py", line 375, in _authorize_token_and_login
credentials = authorization_engine(credentials, credential_store)
File "/snap/qabro/x1/lib/python3.6/site-packages/launchpadlib/credentials.py", line 598, in __call__
request_token_string = self.get_request_token(credentials)
File "/snap/qabro/x1/lib/python3.6/site-packages/launchpadlib/credentials.py", line 615, in get_request_token
token_format=Credentials.DICT_TOKEN_FORMAT)
File "/snap/qabro/x1/lib/python3.6/site-packages/launchpadlib/credentials.py", line 192, in get_request_token
response, content = _http_post(url, headers, params)
File "/snap/qabro/x1/lib/python3.6/site-packages/launchpadlib/credentials.py", line 112, in _http_post
url, method='POST', headers=headers, body=urlencode(params))
File "/snap/qabro/x1/lib/python3.6/site-packages/httplib2/__init__.py", line 1709, in request
conn, authority, uri, request_uri, method, body, headers, redirections, cachekey,
File "/snap/qabro/x1/lib/python3.6/site-packages/httplib2/__init__.py", line 1424, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/snap/qabro/x1/lib/python3.6/site-packages/httplib2/__init__.py", line 1346, in _conn_request
conn.connect()
File "/snap/qabro/x1/lib/python3.6/site-packages/httplib2/__init__.py", line 1138, in connect
self.sock = self._context.wrap_socket(sock, server_hostname=self.host)
File "/snap/qabro/x1/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
_context=self, _session=session)
File "/snap/qabro/x1/usr/lib/python3.6/ssl.py", line 817, in __init__
self.do_handshake()
File "/snap/qabro/x1/usr/lib/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/snap/qabro/x1/usr/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)
>>> # ... login_with() does not.