3
votes

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

2 Answers

2
votes

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!

2
votes

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.