carolinux / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
0 stars 1 forks source link

Google Contacts gdata XML fails retrieval due to incorrect XML returned #538

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. entry = 
gd_client.GetContact('https://www.google.com/m8/feeds/contacts/burgyoav%40gmail.
com/full/7ba957b18bb716d9')
2.
3.

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/.../git/.../gdata/contacts/client.py", line 88, in get_contact
    desired_class=desired_class, **kwargs)
  File "/Users/.../git/.../gdata/client.py", line 644, in get_entry
    desired_class=desired_class, **kwargs)
  File "/Users/.../git/.../gdata/client.py", line 276, in request
    version=get_xml_version(self.api_version))
  File "/Users/.../git/.../atom/core.py", line 520, in parse
    tree = ElementTree.fromstring(xml_string)
  File "<string>", line 85, in XML
SyntaxError: unbound prefix: line 15, column 1600

What version of the product are you using?
3

Please provide any additional information below.
The reason for this failure is a bad XML returned from Google API:

<?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;QXk-eTVSLit7I2A9WhdQFE8MQgA.&quot;'>

    <id>http://www.google.com/m8/feeds/contacts/burgyoav%40gmail.com/base/7ba957b18bb716d9</id>
    <updated>2011-08-15T16:42:20.751Z</updated>

    <app:edited xmlns:app='http://www.w3.org/2007/app'>2011-08-15T16:42:20.751Z</app:edited>
    <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>
.........
    <gd:extendedProperty name='GCon'>
        <ns0:cc>0</ns0:cc>
    </gd:extendedProperty>
    <gContact:groupMembershipInfo deleted='false' href='http://www.google.com/m8/feeds/groups/burgyoav%40gmail.com/base/6'/>
</entry>

ns0 is not defined - hence failing

please contact me if you need the oauth credentials to reproduce

Original issue reported on code.google.com by burgalon on 17 Aug 2011 at 1:30

GoogleCodeExporter commented 9 years ago
Hello,

This issue seems unrelated to the Python client library. Please feel free to 
file an issue against the Contacts API:
http://code.google.com/a/google.com/p/apps-api-issues/issues/list?q=label:API-Co
ntacts

Best,
Alain

Original comment by ala...@google.com on 17 Aug 2011 at 6:16

GoogleCodeExporter commented 9 years ago
I would expect Google to redirect the ticket to the right category, instead of 
relying on users to do the hard work (which is caused by a bug in your end).

Also this bug is affecting us at the moment, so it would be nice to get fixed 
ASAP.

Original comment by christia...@gmail.com on 17 Oct 2011 at 5:27

GoogleCodeExporter commented 9 years ago
Hi,
What is the status of this bug. We also see it with other values but exactly 
the same behaviour.
Apparently it's a very old bug (August). Any chance for a fix?
Thanks,
Corneliu

Original comment by corne...@onesaas.com on 22 Oct 2011 at 6:42