← Back to team overview

launchpad-users team mailing list archive

API login SSL error

 

First off, I'm relatively new to the Launchpad API and to this team so
forgive me if this is the wrong forum for this discussing.

To get to the point, I'm trying to use the Launchpad API to access
private user information (I'm actually trying to write a script to
cross reference LoCo Mailman mailing list subscriber lists with
Launchpad LoCo team memberships) but I'm having trouble with the
login. The code is pretty simple:

  #!/usr/bin/python
  from launchpadlib.launchpad import Launchpad
  from sys import argv

  script, locoteam = argv

  def get_team_members(lp, team):
     team = lp.people[team]
     members = set()
      for member in team.members:
             members.add(member.confirmed_email_addresses_collection_link)
     return members

  lp = Launchpad.login_with('mailman-lp xref script', 'staging')
  cloaks = get_team_members(lp, u'%s' % locoteam)
  print cloaks

Here's the result of using it:

  $ ./ubuntumembersscript.py ubuntu-us-or
  Traceback (most recent call last):
   File "./ubuntumembersscript.py", line 32, in <module>
     lp = Launchpad.login_with('mailman-lp xref script', 'staging')
   File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py",
line 539, in login_with
     credential_save_failed, version)
   File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py",
line 346, in _authorize_token_and_login
     credentials = authorization_engine(credentials, credential_store)
   File "/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py",
line 513, in __call__
     request_token_string = self.get_request_token(credentials)
   File "/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py",
line 530, in get_request_token
     token_format=Credentials.DICT_TOKEN_FORMAT)
   File "/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py",
line 165, in get_request_token
     response, content = _http_post(url, headers, params)
   File "/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py",
line 89, in _http_post
     url, method='POST', headers=headers, body=urlencode(params))
   File "/usr/local/lib/python2.7/dist-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py",
line 1593, in request
     (response, content) = self._request(conn, authority, uri,
request_uri, method, body, headers, redirections, cachekey)
   File "/usr/local/lib/python2.7/dist-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py",
line 1335, in _request
     (response, content) = self._conn_request(conn, request_uri,
method, body, headers)
   File "/usr/local/lib/python2.7/dist-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py",
line 1257, in _conn_request
     conn.connect()
   File "/usr/local/lib/python2.7/dist-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py",
line 1021, in connect
     self.disable_ssl_certificate_validation, self.ca_certs)
   File "/usr/local/lib/python2.7/dist-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py",
line 80, in _ssl_wrap_socket
     cert_reqs=cert_reqs, ca_certs=ca_certs)
   File "/usr/lib/python2.7/ssl.py", line 487, in wrap_socket
      ciphers=ciphers)
    File "/usr/lib/python2.7/ssl.py", line 241, in __init__
     ciphers)
  ssl.SSLError: [Errno 185090050] _ssl.c:344: error:0B084002:x509
certificate routines:X509_load_cert_crl_file:system lib

Any advice as to where I might start figuring this out would be
greatly appreciated!
-- 
@wxl
Lubuntu Release Manager, Head of QA
Ubuntu PPC Point of Contact
Ubuntu Oregon LoCo Team Leader