Issue 719 in gdata-python-client: Getting cElementTree.ParseError: mismatched tag while inserting row in google spreadsheet

151 views
Skip to first unread message

gdata-pyt...@googlecode.com

unread,
May 27, 2015, 6:51:52 AM5/27/15
to gdata-python-client-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 719 by manojpal...@gmail.com: Getting cElementTree.ParseError:
mismatched tag while inserting row in google spreadsheet
https://code.google.com/p/gdata-python-client/issues/detail?id=719

What steps will reproduce the problem?
1. Install gdata-2.0.18
2.Attaching the code
3.Execute the code

What is the expected output? What do you see instead?
Expected Output is "Insert row succeeded."

Previously, I was successful in inserting rows in my spreadsheet.But, I am
unable to insert the row and getting following error. (I didn't change my
code ).

But I am getting below error :

Traceback (most recent call last):
File "example.py", line 33, in <module>
entry = spr_client.InsertRow(dict, spreadsheet_key, worksheet_id)

File "/usr/local/lib/python2.7/dist-packages/gdata/spreadsheet/service.py",
line 339, in InsertRow
converter=gdata.spreadsheet.SpreadsheetsListFromString)
File "/usr/local/lib/python2.7/dist-packages/gdata/service.py", line
1236, in Post
media_source=media_source, converter=converter)
File "/usr/local/lib/python2.7/dist-packages/gdata/service.py", line
1347, in PostOrPut
redirects_remaining - 1, media_source, converter=converter)
File "/usr/local/lib/python2.7/dist-packages/gdata/service.py", line
1329, in PostOrPut
return converter(result_body)

File "/usr/local/lib/python2.7/dist-packages/gdata/spreadsheet/__init__.py",
line 377, in SpreadsheetsListFromString
xml_string)
File "/usr/local/lib/python2.7/dist-packages/atom/__init__.py", line 93,
in optional_warn_function
return f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/atom/__init__.py", line 127,
in CreateClassFromXMLString
tree = ElementTree.fromstring(xml_string)
File "<string>", line 124, in XML
cElementTree.ParseError: mismatched tag: line 921, column 4


What version of the product are you using?
gdata-2.0.18
python2.7

Please provide any additional information below.


Attachments:
example.py.txt 1.0 KB

--
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 27, 2015, 7:03:59 AM5/27/15
to gdata-python-client-...@googlegroups.com

Comment #1 on issue 719 by manojpal...@gmail.com: Getting
cElementTree.ParseError: mismatched tag while inserting row in google
spreadsheet
https://code.google.com/p/gdata-python-client/issues/detail?id=719

This issue being discussed in this as well
https://code.google.com/p/google-apps-script-issues/issues/detail?id=5102

gdata-pyt...@googlecode.com

unread,
May 28, 2015, 7:33:03 PM5/28/15
to gdata-python-client-...@googlegroups.com

Comment #2 on issue 719 by step...@plugable.com: Getting
cElementTree.ParseError: mismatched tag while inserting row in google
spreadsheet
https://code.google.com/p/gdata-python-client/issues/detail?id=719

In digging around, it seems like the problem is that the ClientLogin method
has been completely deprecated. In order to access spreadsheets, you'll
need to use OAuth2 login methods.

gdata-pyt...@googlecode.com

unread,
May 29, 2015, 4:53:42 PM5/29/15
to gdata-python-client-...@googlegroups.com

Comment #3 on issue 719 by ja...@jasonantman.com: Getting
cElementTree.ParseError: mismatched tag while inserting row in google
spreadsheet
https://code.google.com/p/gdata-python-client/issues/detail?id=719

This is a "known" issue that I just found today. It turns out that the
Client Login authorization has been deprecated and was recently disabled;
the API now returns a HTTP 200 with an empty body if you attempt a
ClientLogin. Unfortunately, there's no handling of this in
gdata-python-client, and you get the above error.

See https://github.com/google/gdata-python-client/issues/24
and ?place=topic%2Fgoogle-spreadsheets-api%2FgmZHNh5cR80%2Fdiscussion

gdata-pyt...@googlecode.com

unread,
May 29, 2015, 4:56:10 PM5/29/15
to gdata-python-client-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages