Does gdata spreadsheet library for python no longer work?

I tried to run a query for data in one of my Google docs, and it worked for several months. Starting yesterday or the day before, I noticed that my script no longer works. Has Google updated its spreadsheet api? Has anyone found a workaround?

My error looks like this:

Traceback (most recent call last): File "build_packer_image.py", line 311, in <module> for index, entry in enumerate(client.GetWorksheetsFeed(doc_key).entry): File "/build/toolchain/mac-10.5-32/lib/python2.7/site-packages/gdata/spreadsheet/service.py", line 129, in GetWorksheetsFeed converter=gdata.spreadsheet.SpreadsheetsWorksheetsFeedFromString) File "/build/toolchain/mac-10.5-32/lib/python2.7/site-packages/gdata/service.py", line 1074, in Get return converter(result_body) File "/build/toolchain/mac-10.5-32/lib/python2.7/site-packages/gdata/spreadsheet/__init__.py", line 411, in SpreadsheetsWorksheetsFeedFromString xml_string) File "/build/toolchain/mac-10.5-32/lib/python2.7/site-packages/atom/__init__.py", line 93, in optional_warn_function return f(*args, **kwargs) File "/build/toolchain/mac-10.5-32/lib/python2.7/site-packages/atom/__init__.py", line 127, in CreateClassFromXMLString tree = ElementTree.fromstring(xml_string.replace('doctype','DOCTYPE')) File "<string>", line 125, in XML cElementTree.ParseError: no element found: line 1, column 0 Build step 'Execute shell' marked build as failure Finished: FAILURE 

I use:

  • Python 2.7.5
  • gdata 2.0.18

I just use the document key and do not indicate in my code if that matters (I pass the username and password to the ClientLogin method)

+5
source share
1 answer

Actually, here is the answer to the problem:

Using a client name (using username / password instead of oauth2) is probably the cause of the error. This protocol was deprecated 3+ years ago and was simply turned off. If you capture an HTTP response (which seems to have some HTML content), that might confirm the disconnect related. Migrating to OAuth 2 will ensure your applications work again.

After submitting the xml for update in the spreadsheet, google will respond using the login page. This means that authentication does not work for gdata p> right now

https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3851#c2

+5
source

All Articles