I think this bug may be related: http://code.google.com/p/gdata-issues/issues/detail?id=1147
<http://code.google.com/p/gdata-issues/issues/detail?id=1147>Eric On Thu, May 21, 2009 at 1:07 PM, jmvidal <jmvi...@gmail.com> wrote: > > The following test program is suppossed to create a new spreadsheet: > > #!/usr/bin/python > > import gdata.spreadsheet.text_db > import getpass > import atom > import gdata.contacts > import gdata.contacts.service > import smtplib > import time > > password = getpass.getpass() > client = gdata.spreadsheet.text_db.DatabaseClient > (username='jmvi...@gmail.com',password=password) > database = client.CreateDatabase('My Test Database') > table = database.CreateTable('addresses', ['name','email', > 'phonenumber', 'mailingaddress']) > record = table.AddRecord({'name':'Bob', > 'email':'b...@example.com<email%27%3a%27...@example.com> > ', > 'phonenumber':'555-555-1234', 'mailingaddress':'900 Imaginary > St.'}) > > # Edit a record > record.content['email'] = 'b...@example.com' > record.Push() > > > which it does, but only on about every 1 out of 5 runs. On the other 4 > out of 5 runs I get: > > > Password: > Traceback (most recent call last): > File "./test.py", line 13, in <module> > database = client.CreateDatabase('My Test Database') > File "/home/jmvidal/share/progs/googleapps/google_appengine/ > glassboard/gdata/spreadsheet/text_db.py", line 146, in CreateDatabase > db_entry = self.__docs_client.UploadSpreadsheet > (virtual_media_source, name) > File "/home/jmvidal/share/progs/googleapps/google_appengine/ > glassboard/gdata/docs/service.py", line 304, in UploadSpreadsheet > return self._UploadFile(media_source, title, category, > folder_or_uri) > File "/home/jmvidal/share/progs/googleapps/google_appengine/ > glassboard/gdata/docs/service.py", line 144, in _UploadFile > converter=gdata.docs.DocumentListEntryFromString) > File "/home/jmvidal/share/progs/googleapps/google_appengine/ > glassboard/gdata/service.py", line 1151, in Post > media_source=media_source, converter=converter) > File "/home/jmvidal/share/progs/googleapps/google_appengine/ > glassboard/gdata/service.py", line 1271, in PostOrPut > 'reason': server_response.reason, 'body': result_body} > gdata.service.RequestError: {'status': 404, 'body': '<HTML>\n<HEAD> > \n<TITLE>Not Found</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" > TEXT="#000000">\n<H1>Not Found</H1>\n<H2>Error 404</H2>\n</BODY>\n</ > HTML>\n', 'reason': 'Not Found'} > > The same thing happens when I run similar code on the appengine, so I > don't think this problem is due to a slow connection (also, I have a > cable modem, which works at about 1Mbps). > > So, why a 404? and, more importantly, is there anyway to improve the > chances that my CreateDatabase call will succeed? > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Docs Data APIs" group. To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com To unsubscribe from this group, send email to google-docs-data-apis+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Docs-Data-APIs?hl=en -~----------~----~----~----~------~----~------~--~---