Google App Engine appcfg.py data_upload Authentica

2019-04-11 22:23发布

I am using appcfg.py to upload data to datastore from a csv file. But every time I try, I am getting error:

[info    ] Authentication failed

even if i am using Admin id and password.
In my app.yaml file I am having:

handlers:
- url: /remote_api
  script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
  login: admin

- url: .*
  script: MainHandler.py

Can anybody please help me? Thanks in advance.

2条回答
ゆ 、 Hurt°
2楼-- · 2019-04-11 22:35

If your administrator is an Apps for Domains account (eg, @yourdomain.com), and your app uses Google Accounts authentication, you won't be able to authenticate as an admin on your app. You need to add a Google Accounts (eg, @google.com) account as an administrator, and use that to upload.

查看更多
甜甜的少女心
3楼-- · 2019-04-11 22:54

That app.yaml file looks good to me, but are you sure it's been deployed to the server? The docs explicitly note that you need to update your app on the server before using appcfg.py to bulk upload data will work, so you might try the suggested command:

appcfg.py update <app-directory>

You might also look at deleting your session cookies, particularly if appcfg.py isn't asking you for your authentication each time -- it may have saved an incorrect password.

Hope some of this helps!

查看更多
登录 后发表回答