Nick, I went back to my real word code and created a CSV and yes, the
same problem...

[INFO    ] Connecting to localhost:8080/remote_api
[DEBUG   ] [Thread-11] ProgressTrackerThread: started
[DEBUG   ] [Thread-12] DataSourceThread: started
[INFO    ] Starting import; maximum 10 entities per post
[DEBUG   ] [Thread-12] DataSourceThread: exiting
[DEBUG   ] Waiting for worker threads to finish...
[DEBUG   ] [Thread-3] Got work item [1-10]
[ERROR   ] Retrying on non-fatal datastore error: Put accepted 10
entities but returned 0 keys.
Traceback (most recent call last):
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\bulkloader.py", line 675, in PerformWork
    transfer_time = self._TransferItem(thread_pool)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\bulkloader.py", line 832, in _TransferItem
    self.request_manager.PostEntities(self.content)
  File "C:\Program Files\Google\google_appengine\google\appengine\tools
\bulkloader.py", line 1239, in PostEntities
    datastore.Put(entities)
  File "C:\Program Files\Google\google_appengine\google\appengine\api
\datastore.py", line 179, in Put
    (num_entities, num_keys))
InternalError: Put accepted 10 entities but returned 0 keys.
[INFO    ] Backing off due to errors: 1.0 seconds
[DEBUG   ] [Thread-3] Got work item [1-10]

On 21 Sep, 14:52, "Nick Johnson (Google)" <nick.john...@google.com>
wrote:
> Hi Col,
> Can you try loading from CSV (eg, remove your generate_records method) and
> let us know if you see the same problem? Also, can you please include the
> complete stacktrace?
>
> -Nick Johnson
>
> On Sat, Sep 19, 2009 at 12:28 PM, Col Wilson <
>
>
>
>
>
> col.wilson.em...@googlemail.com> wrote:
>
> > loaders = [ThingLoader]
>
> > is what I meant to type.
>
> > On Sep 19, 10:14 am, Col Wilson <col.wilson.em...@googlemail.com>
> > wrote:
> > > 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 = [Thing]
>
> > > 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. Any ideas
> > > what I should do?
>
> --
> Nick Johnson, Developer Programs Engineer, App Engine
> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
> 368047
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to