Hi Everyone, 

I consistently get the Internal Server Error 500 when I attempt to update a 
row in one of my spreadsheets; however the row is deleted. I am using the 
python client library and running OSX.
I use the following code, with the appropriate libraries:

******

def _ListUpdateAction(client, curr_key, curr_wrksht_id, index):
   
    feed = client.GetListFeed(curr_key, curr_wrksht_id)
     _PrintFeed(feed)                                                       
                                                                            
                                                                            
                                                                            
   
    entry = client.UpdateRow(feed.entry[index], {"One": "52"});
    if isinstance(entry, gdata.spreadsheet.SpreadsheetsList):
        print 'Updated!

******

The id's of the spreadsheet and the worksheet are correct, as I can easily 
print the correct worksheet with the _PrintFeed function. 
I pass in 2 for my index, making sure that the worksheet has that row, and a 
column name of "One."

If I print out the entry variable, I get : 


<ns0:entry xmlns:ns0="http://www.w3.org/2005/Atom";><ns0:category 
scheme="http://schemas.google.com/spreadsheets/2006"; 
term="http://schemas.google.com/spreadsheets/2006#list"; 
/><ns0:id>https://spreadsheets.google.com/feeds/list/t6M3JU4wtYje_E4cKHhAzIg/od6/private/full/dqi9q</ns0:id><ns0:content
 
type="text" /><ns0:updated>2011-03-14T21:14:59.463Z</ns0:updated><ns0:title 
type="text">a</ns0:title><ns0:link 
href="https://spreadsheets.google.com/feeds/list/t6M3JU4wtYje_E4cKHhAzIg/od6/private/full/dqi9q";
 
rel="self" type="application/atom+xml" /><ns0:link 
href="https://spreadsheets.google.com/feeds/list/t6M3JU4wtYje_E4cKHhAzIg/od6/private/full/dqi9q/b5";
 
rel="edit" type="application/atom+xml" /><ns1:One 
xmlns:ns1="http://schemas.google.com/spreadsheets/2006/extended";>52</ns1:One></ns0:entry>

I also tried printing it right before the PUT call, and it is identical. 

I consistently get the following result: 

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "digg/periodic/load_analytics.py", line 65, in g
    _ListUpdateAction(client, curr_key, curr_wrksht_id, 1)
  File "digg/periodic/load_analytics.py", line 85, in _ListUpdateAction
    entry = client.UpdateRow(feed.entry[index], {"One": "52"});
  File 
"/home/veljko/bobtail/lib/python2.5/site-packages/gdata-2.0.14-py2.5.egg/gdata/spreadsheet/service.py",
 
line 369, in UpdateRow
    converter=gdata.spreadsheet.SpreadsheetsListFromString)
  File 
"/home/veljko/bobtail/lib/python2.5/site-packages/gdata-2.0.14-py2.5.egg/gdata/service.py",
 
line 1399, in Put
    media_source=media_source, converter=converter)
  File 
"/home/veljko/bobtail/lib/python2.5/site-packages/gdata-2.0.14-py2.5.egg/gdata/service.py",
 
line 1359, in PostOrPut
    'reason': server_response.reason, 'body': result_body}
gdata.service.RequestError: {'status': 500, 'body': 'Internal Error', 
'reason': 'Internal Server Error'}


Again, the row is deleted; that is the row is still there, but is now blank. 
I want to guess this is some sort of xml formatting error, since the correct 
row is being selected, but is updating it to blank entries. Any help at all 
would be much appreciated. Thank you. 

Reply via email to