Hi, Unfortunately, the Contact python client library is still supporting only v1, we are working to update it to support v2 and v3, however this work has not been finished yet. It has now few of the fields needed for v3 and it has the minimal support needed for the Profiles API, there was a bug in the contacts service (gdata-2.0.4) that was causing it to make v3 calls. I apologize for any confusion this may have caused, hopefully we will release it soon.
Please use Python gdata-2.0.3, download the latest one from the SVN or add the header to force it to use v1. Cheers, Julian. On Oct 27, 12:21 pm, Apps Guru <[email protected]> wrote: > Julian, > Thank you for very helpful posts and for including support > Contacts API v3 in python. > > I have a question about support for Photo in latest version of > gdata-2.0.4 which has support for Contacts API v3. > > I am trying to add photo for Shared Contacts via the API. I am using > ChangePhoto method as given in Developer > Guide:http://code.google.com/apis/contacts/docs/1.0/developers_guide_python... > > I get an error that 'Nonetype' attribute has no href. I looked deeper > to find that the contact did not have rel type of edit-photo. It just > has rel type of photo. > > I looked further: > The first few lines of this ChangePhoto method are: > > if isinstance(contact_entry_or_url, gdata.contacts.ContactEntry): > url = contact_entry_or_url.GetPhotoEditLink().href > else: > url = contact_entry_or_url > > So it seems it is trying to get edit link for photo. > > In GetPhotoEditLink() is > > def GetPhotoEditLink(self): > for a_link in self.link: > if a_link.rel == PHOTO_EDIT_LINK_REL: > return a_link > return None > > So we are comparing rel with Photo_Edit_Rel ('http:// > schemas.google.com/contacts/2008/rel#edit-photo') > > Looping through all link.rel, the Contact does not seem to have > rel#edit-photo type. I believe it was present in v1 and not there in > v3 as seen from Protocol developer guides for v1 and > v3:http://code.google.com/apis/contacts/docs/1.0/developers_guide_protoc...http://code.google.com/apis/contacts/docs/3.0/developers_guide_protoc... > > I did try to use rel#photo url - I was able to save the changes and > GetPhoto method gives me the picture back but it has been 36hrs but > Photo is not visible in Contact once I search for the same in Contact > Manager UI (neither in Contacts tab search for that contact). > > Any help is highly appreciated. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Contacts API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-contacts-api?hl=en -~----------~----~----~----~------~----~------~--~---
