Contact creation error using python-gdata API -
i have question regarding contact creation using python google data api. trying example contact creation python, in documentation page (https://developers.google.com/google-apps/contacts/v3/#creating_contacts)
so, created client following:
email='<my gmail uid>' password='<my gmail pwd>' gd_client = gdata.contacts.client.contactsclient(source='googleinc-contactspythonsample-1') try: gd_client.clientlogin(email, password, gd_client.source) except gdata.client.badauthentication: print 'invalid user credentials given.' gd_client = none
then executed function using:
create_contact(gd_client)
what call is:
traceback (most recent call last): file "<ipython console>", line 1, in <module> file "<ipython console>", line 23, in create_contact attributeerror: 'module' object has no attribute 'postcode'
so want ask whether doing wrong, whether known bug, or whether documentation outdated. thanks.
p.s. small comment, think better wrapping of google data api in python library useful. spent significant time in finding, within api implementation, fields should set (directly!) , classes should used assign them.
ok, seems can answer question, partly duplicate of
it turns out sample code in documentation invalid (thanks, google) postcode should postcode, , instant messaging address incorrect.
removing that, completes successfully
Comments
Post a Comment