I'm using Python 2.5 locally and GAE 1.5. I'm trying to load data which is not is CSV format. Here's a simplified model which reflects what I get with a more complex real life issue:
class Thing(db.Model):
name = db.StringProperty()
class ThingLoader(bulkloader.Loader):
elements = [
('name', str)
]
def __init__(self):
bulkloader.Loader.__init__(self, 'Thing', self.elements)
def generate_records(self, filename):
records = load_records_from_some_datasource()
for record in records:
yield [
record['name']
]
loaders = [ThingLoader]
When I try to bulkload this (both locally or to google) I get: InternalError: Put accepted 10 entities but returned 0 keys. I can't work out why the datastore will not allocate keys, I have even tried writing a generate_keys of my own for the loader.
Here's my command line call:
python "C:\Program Files\Google\google_appengine\\appcfg.py" upload_data --url=http://localhost:8080/remote_api --config_file=data_api.py --filename=raw.dat --kind=Thing --log_file=logfile.log --email=col.wilson.email .
Any ideas what I should do?