Frage

I'm stuck with this:

Several thousand profiles keep failing on update. I don't know what's wrong with them. Can you take a look on these?

A submitted profile/contact entry:

<ns0:entry xmlns:ns0="http://www.w3.org/2005/Atom" xmlns:ns1="http://schemas.google.com/g/2005" xmlns:ns2="http://www.w3.org/2007/app" xmlns:ns3="http://schemas.google.com/contact/2008" ns1:etag="&quot;WhcGQ08KRCt7I2A_&quot;"><ns0:category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/contact/2008#profile" /><ns0:id>http://www.google.com/m8/feeds/profiles/domain/<domain>/full/<username></ns0:id><ns1:name><ns1:familyName>Xxxxxxxx xx Xxxx Xxxxxxx</ns1:familyName><ns1:fullName>Xxxxxxx Xxxxxxxx xx Xxxx Xxxxxxx</ns1:fullName><ns1:givenName>Xxxxxxx</ns1:givenName></ns1:name><ns0:updated>2013-09-09T21:26:21.000Z</ns0:updated><ns1:phoneNumber label="Xxxxxxxxx">1234</ns1:phoneNumber><ns1:phoneNumber rel="http://schemas.google.com/g/2005#work">123 456 789</ns1:phoneNumber><ns1:organization rel="http://schemas.google.com/g/2005#work"><ns1:orgDepartment>Xxxxxxxx 123-X</ns1:orgDepartment><ns1:orgName>Xxxxxxxx xx Xxxxxxx</ns1:orgName></ns1:organization><ns0:title>Xxxxxxx Xxxxxxxx xx Xxxx Xxxxxxx</ns0:title><ns0:link href="https://www.google.com/m8/feeds/photos/profile/<domain>/<username>" rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*" /><ns0:link href="https://www.google.com/m8/feeds/profiles/domain/<domain>/full/<username>" rel="self" type="application/atom+xml" /><ns0:link href="https://www.google.com/m8/feeds/profiles/domain/<domain>/full/<username>" rel="edit" type="application/atom+xml" /><ns1:email address="<username>@<domain>" primary="true" rel="http://schemas.google.com/g/2005#work" /><ns2:edited>2013-09-09T21:26:21.000Z</ns2:edited><ns3:status indexed="true" /></ns0:entry>

Response is:

Server responded with: 409, <?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gContact='http://schemas.google.com/contact/2008' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='&quot;WxRTFUUNRit7I2Bu&quot;'><id>http://www.google.com/m8/feeds/profiles/domain/<domain>/full/<username></id><updated>2013-09-09T21:26:21.000Z</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2013-09-09T21:26:21.000Z</app:edited><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#profile'/><title>Xxxxxxx Xxxxxxxx xx Xxxx Xxxxxxx</title><link rel='http://schemas.google.com/contacts/2008/rel#photo' type='image/*' href='https://www.google.com/m8/feeds/photos/profile/deusto.es/a.mdel'/><link rel='self' type='application/atom+xml' href='https://www.google.com/m8/feeds/profiles/domain/<domain>/full/<username>'/><link rel='edit' type='application/atom+xml' href='https://www.google.com/m8/feeds/profiles/domain/<domain>/full/<username>'/><gd:name><gd:fullName>Xxxxxxx Xxxxxxxx xx Xxxx Xxxxxxx</gd:fullName><gd:givenName>Xxxxxxx</gd:givenName><gd:familyName>Xxxxxxxx xx Xxxx Xxxxxxx</gd:familyName></gd:name><gContact:status indexed='true'/><gd:email rel='http://schemas.google.com/g/2005#work' address='<username>@<domain>' primary='true'/></entry>



Code:

import gdata.contacts.client

client = gdata.contacts.client.ContactsClient(domain='mydomain')
client.ClientLogin(email='superuser@mydomain', password='password', source='mydomain-myapp', account_type='HOSTED', service='cp')
client.UpdateProfile(profile)

I know that ClientLogin is deprecated, but.. Can anyone try to reproduce this error?

War es hilfreich?

Lösung

SOLVED

After reading this I saw that 409 response status error was happening because contact/profile entry was being updated from two sources, so the result is a version conflict.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top