不幸的是,我错误地将我的 blob 密钥存储在数据存储中,因此需要自己迁移它们。
我正在使用主从到 HRD 迁移文档:
https://developers.google.com/appengine/docs/adminconsole/migration
最后,他们提到以下内容以获取新密钥:
from google.appengine.ext import blobstore
def GetNewBlobKey(old_key)
return blobstore.BlobMigrationRecord.get_new_blob_key(old_key)
我完全按照上面的方式做,但得到以下错误:
'module' object has no attribute 'BlobMigrationRecord'
Traceback (most recent call last):
File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
return handler.dispatch()
File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/1.359990895908922231/main.py", line 1302, in post
userEntity.imageUrlBlobKey = blobstore.BlobMigrationRecord.get_new_blob_key(userEntity.imageUrlBlobKey)
AttributeError: 'module' object has no attribute 'BlobMigrationRecord'
任何帮助将非常感激