Seems like the gdata.contacts.client.ContactsClient is v3? I haven't 
installed the v3 yet and besides I already have trouble with v2 API, so I 
had to borrow some v1 API to get some parts to work.

Interestingly, the workaround I mentioned in my OP, which is to fetch the 
image URL and pass in content_length argument worked well on that day, but 
today I get this below error:

  File 
"/Users/hdara/bin/python/lib/python2.6/site-packages/gdata/contacts/service.py",
 
line 245, in ChangePhoto
    return self.Put(payload, url)
  File 
"/Users/hdara/bin/python/lib/python2.6/site-packages/gdata/service.py", line 
1395, in Put
    media_source=media_source, converter=converter)
  File 
"/Users/hdara/bin/python/lib/python2.6/site-packages/gdata/service.py", line 
1358, in PostOrPut
    'reason': server_response.reason, 'body': result_body}
gdata.service.RequestError: {'status': 415, 'body': 'Content-Type image/jpeg 
is not a valid input type.', 'reason': 'Unsupported Media Type'}

I can't think of anything that changed since then. Why would image/jpeg be 
unsupported?

-- 
You received this message because you are subscribed to the Google
Groups "Google Contacts, Shared Contacts and User Profiles APIs" 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://code.google.com/apis/contacts/community/forum.html

Reply via email to