Issue 700 in gdata-python-client: Doing a batched delete of contacts always returns "If-Match or If-None-Match header or entry etag attribute required" error
39 views
Skip to first unread message
gdata-pyt...@googlecode.com
unread,
May 28, 2014, 4:19:25 AM5/28/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gdata-python-client-...@googlegroups.com
Status: New Owner: ---- Labels: Type-Defect Priority-Medium
What is the expected output? What do you see instead?
Expected output would be for the contacts to be deleted. Instead a 403 response with message "If-Match or If-None-Match header or entry etag attribute required" is returned.
Even with the recommended workaround of adding the "If-Match: *" header doesn't work:
Not sure if it's related, but this started happening when Google required the "Contacts API" entry in the Cloud Console UI to be enabled. Before, there was no entry for "Contacts API" in the Cloud Console UI, so I guess it was enabled by default. But after being added, and it was set to Disabled by default, things started breaking.
-- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings
gdata-pyt...@googlecode.com
unread,
May 28, 2014, 9:59:44 PM5/28/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gdata-python-client-...@googlegroups.com
Comment #1 on issue 700 byjoh...@gmail.com: Doing a batched delete of
I had the same problem, but i found (few days ago), that if you replace in request feed the namespace prefix of xmlns:ns1="http://schemas.google.com/g/2005" to 'gd' (ns1 > gd), it's working. You can try it in OAuth 2.0 Playground.
gdata-pyt...@googlecode.com
unread,
Jul 1, 2014, 9:39:00 PM7/1/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Thanks, that worked! I ended up making a modification to gdata/client.py, I couldn't figure out a better way to override it from my own code. I'll have to do some more testing to make sure it doesn't hurt anything. It should get me by for now. Here's the change:
desired_class=None, **kwargs): if converter is None and desired_class is None: desired_class = entry.__class__ http_request = atom.http_core.HttpRequest()
# when it comes time to do a batched delete/update, # instead of calling client.ExecuteBatch, I instead directly call patched_post patched_post(my_client_instance, request_feed, 'https://www.google.com/m8/feeds/contacts/default/full/batch')
gdata-pyt...@googlecode.com
unread,
Jul 18, 2014, 5:40:45 PM7/18/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Is this the correct way to solve the problem? It will indiscriminately replace all occurrences of 'ns1' from the anywhere in the string representation of the entry, including its user-submitted data fields.
gdata-pyt...@googlecode.com
unread,
Jul 18, 2014, 6:02:35 PM7/18/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message