Copying data from GAE to local data storage fails

倾然丶 夕夏残阳落幕 提交于 2019-12-01 07:05:56

问题


I have followed all the instructions:

1) I downloaded it like this:

appcfg.py download_data -A s~myApp --url=https://myApp.appspot.com/_ah/remote_api/ --filename=data.csv

Note that according to this solution I have to append s~ to the app name, or I get the error message:google.appengine.api.datastore_errors.BadRequestError: app s~myApp cannot access app myApp's data

2) I have to add remote_api access to my app.yaml

- url: /remote_api
  script: google.appengine.ext.remote_api.handler.application
  login: admin

3) I have to run the local server and go to http://localhost:8080/remote_api. In there I enter the admin email for local env and set it as administrator.

4) I upload the csv to local data storage:

appcfg.py --url=http://localhost:8080/_ah/remote_api/ --filename=data.csv upload_data src/

Unfortunately it fails now with this error message:

ApplicationError: ApplicationError: 1 app "dev~myApp" cannot access app "myApp"'s data

What am I missing please?


回答1:


I found the solution myself, you have to specify the dev application name, hope this helps others.

appcfg.py --url=http://localhost:8080/_ah/remote_api/ --filename=data.csv upload_data -A dev~myApp src/


来源:https://stackoverflow.com/questions/21470032/copying-data-from-gae-to-local-data-storage-fails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!