According to the docs, None should work. Try returning empty list [].

def HandleEntity(self, entity):
    """Subclasses can override this to add custom entity conversion
code.

    This is called for each entity, after its properties are populated
from
    CSV but before it is stored. Subclasses can override this to add
custom
    entity handling code.

    The entity to be inserted should be returned. If multiple entities
should
    be inserted, return a list of entities. If no entities should be
inserted,
    return None or [].

    Args:
      entity: db.Model

    Returns:
      db.Model or list of db.Model
    """
    return entity


On Feb 15, 1:41 am, Ilia Lobsanov <[email protected]> wrote:
> Before 1.1.9 I had been using bulkload.Loader with my own HandleEntity
> which
> 1) added a key_name to the entity
> 2) added a __searchable_text_index property to the entity using
> search.SearchableModel
> 3) updated some counters in other entities
>
> Here's my migration experience.
>
> - I had to modify my loader script to override the GenerateKey method
> to do the job of (1). Note that GenerateKey takes a list of values as
> argument.
> - HandleEntity used to take a datastore.Entity object. As of 1.1.9
> HandleEntity now takes a db.Model object. That means I can't use
> SearchableModel (see point 2) directly because that expects a
> datastore.Entity. Any help on this?
> - returning None from HandleEntity used to mean: don't update the
> entity. Now it's TypeError: 'NoneType' object is not iterable*
> - loading with batch_size=1 and num_threads=1 is very slow compared to
> loading one row at a time in pre-1.1.9
> - what happened to the --cookie option? now I have enter my email and
> password every time i'm loading data into the dev server. it was
> convenient  to specify --
> cookie='dev_appserver_login="[email protected]:True"'
>
> * Traceback (most recent call last):
>   File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/tools/bulkloader.py", line 1305, in run
>     self.PerformWork()
>   File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/tools/bulkloader.py", line 1381, in PerformWork
>     item.content = self.request_manager.EncodeContent(item.rows)
>   File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> google/appengine/tools/bulkloader.py", line 812, in EncodeContent
>     entities.extend(entity)
> TypeError: 'NoneType' object is not iterable
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to