我收到以下错误:
google.appengine.api.datastore_errors.BadRequestError: \
Illegal string "dev~None" in dataset id.
当我尝试在本地开发环境中使用我的生产数据库时:
$ appcfg.py download_data \
--application=s~app-id \
--url=http://app-id.appspot.com/_ah/remote_api \
--filename=database.ndb
$ appcfg.py upload_data \
--application=dev~app-id \
--url=http://localhost:53828/_ah/remote_api \
--filename=database.ndb
任何提示?我最好的猜测是,从appcfg.py
到gcloud
的转变打破了某些问题。我大多数时候都使用后者,但我找不到使用gcloud
完成此任务的方法。谢谢!
答案 0 :(得分:1)
运行本地appengine时,您必须指定-A参数来设置任何应用程序ID,否则您将收到Illegal string "dev~None" in dataset id
错误。我花了一段时间才弄明白这一点。旧的环境变量APPLICATION_ID不起作用(并且不会从yaml文件中获取应用程序ID)。