I am using the bulkloader to move data from one App Engine app to
another (server-hosted app or local dev). I've got the configuration
file setup and the datastore entities migrate nicely, but I'm having
trouble migrating the blobstore files.
Assuming I can pull down all the blobstore files from App A, I wrote a
function that would restore the blobs in App B. The function creates
an upload URL, receives the posted file, and the old blobkey. So I've
got the old blob key and the new blob key, and restoring the image
should be a simple matter of finding the entities that reference the
old blobkey and updating them to use the new one.
Apparently not. Whenever I try to query for an object that has an
invalid (old app) BlobReferenceProperty, I get the following
exception. Is there any way I can get to the parent object to fix or
even remove the reference?
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/webapp/__init__.py", line 702, in __call__
handler.post(*groups)
File "/Users/coreyb/Sites/applicationb/frontend/api.py", line 997,
in post
user_profile = UserProfile.gql('WHERE user = :1', user).get()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/db/__init__.py", line 1974, in get
results = self.fetch(1, config=config)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/db/__init__.py", line 2036, in fetch
return [self._model_class.from_entity(e) for e in raw]
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/db/__init__.py", line 1369, in from_entity
entity_values = cls._load_entity_values(entity)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/db/__init__.py", line 1345, in
_load_entity_values
value = prop.make_value_from_datastore(entity[prop.name])
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/blobstore/blobstore.py", line 463, in
make_value_from_datastore
return BlobInfo(value)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/blobstore/blobstore.py", line 186, in __init__
raise TypeError('Must provide Entity or BlobKey')
--
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.