Copying data from GAE to local data storage fails

2020-03-25 09:45发布

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条回答
疯言疯语
2楼-- · 2020-03-25 10:17

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/
查看更多
登录 后发表回答