google-code-export / gdata-python-client

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

gdata.spreadsheet.text_db.Table.SetFields results in RequestError #522

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. i'm trying to add a column to existing worksheet
first of all i'm getting it's headers, srot them by column index, append new 
field name, then try to SetFields for worksheet table by 
gdata.spreadsheet.text_db.Table.SetFields
sometimes it works for me, but most of time i m getting RequestError reporting 
{'status': 403, 'body': 'It looks like someone else already deleted this 
cell.', 'reason': 'Forbidden'}

table = gdata.spreadsheet.text_db.Table(worksheet_entry=products_ws,
                                        spreadsheet_key = sskey,
                                        database_client = self.database_client)
headers = self.get_products_ws_headers(sskey, products_ws)

headers_names_sorted = [k for (k, v) in sorted(headers.iteritems(), key=lambda 
(k,v): int(v))]
# no field_name in headers, i double checked
headers_names_sorted.append(field_name)
if True:
    try:
        table.SetFields(headers_names_sorted)
        break
    except Exception, e:
        tries+=1
        print type(e), e

What is the expected output? What do you see instead?
the column must be added to worksheet
but i got gdata.service.RequestError

What version of the product are you using?
2.0.14

Please provide any additional information below.

Original issue reported on code.google.com by cluster.master@gmail.com on 9 Jun 2011 at 8:38

GoogleCodeExporter commented 9 years ago

Original comment by afs...@google.com on 7 Oct 2011 at 12:34

GoogleCodeExporter commented 9 years ago

Original comment by afs...@google.com on 2 Feb 2012 at 2:41