Google spreadsheets - getting started

Mark Carter alt.mcarter at
Sat Nov 3 13:40:51 CET 2012

OK, the story so far:

import gdata
import gdata.auth
import gdata.gauth
import OpenSSL.crypto

tokenfile = "privatekey.p12"
#f = open(tokenfile, 'r')
#blob =
#if blob:
p12 = OpenSSL.crypto.load_pkcs12(file(tokenfile, 'rb').read(), 'notasecret')
print p12.get_certificate() 
#token = gdata.gauth.token_from_blob(p12)
#print "token: ", token

gd_client =

feed = gd_client.GetDocumentListFeed() # line 22
for entry in feed.entry:
      print entry.title.text.encode('UTF-8')

print "Finished"

It baulks as follows:
/usr/bin/python -u  "/home/mcarter/"
<X509 object at 0x7fccc0917a50>
Traceback (most recent call last):
  File "/home/mcarter/", line 22, in <module>
    feed = gd_client.GetDocumentListFeed()
  File "/usr/lib/pymodules/python2.7/gdata/docs/", line 259, in GetDocumentListFeed
    return self.QueryDocumentListFeed(uri)
  File "/usr/lib/pymodules/python2.7/gdata/docs/", line 238, in QueryDocumentListFeed
    return self.Get(uri,
  File "/usr/lib/pymodules/python2.7/gdata/", line 1068, in Get
  File "/usr/lib/pymodules/python2.7/atom/", line 92, in optional_warn_function
    return f(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/atom/", line 184, in request
    return auth_token.perform_request(self.http_client, operation, url, 
AttributeError: 'PKCS12' object has no attribute 'perform_request'


More information about the Python-list mailing list