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

how create google contact?

it turns out sample code in documentation invalid (thanks, google) postcode should postcode, , instant messaging address incorrect.

removing that, completes successfully


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -