Aaron Watters
Aaron Watters

Reputation: 2846

Google app engine: how to use downloaded data using the development server?

After I download the data from my google app engine application I would like to start up the development server and see the downloaded data on the local pages. Can I do this? I'm sure I can, but I can't figure it out. Sorry if this is a repeat or I'm just being stupid again. Thanks in advance. I'm using the Python environment, if that matters.

I tried this:

google_appengine/appcfg.py upload_data --url=http://localhost:8080/ --filename=Data/copy.csv appname

and got this

Application: appname; version: 1.
Uploading data records.
[INFO    ] Logging to bulkloader-log-20110201.103838
[INFO    ] Throttling transfers:
[INFO    ] Bandwidth: 250000 bytes/second
[INFO    ] HTTP connections: 8/second
[INFO    ] Entities inserted/fetched/modified: 20/second
[INFO    ] Batch Size: 10
[INFO    ] Opening database: bulkloader-progress-20110201.103838.sql3
Please enter login credentials for localhost
Email: [email protected]
Password for [email protected]: 
[INFO    ] Connecting to localhost:8080/
[INFO    ] Authentication Failed

what am I supposed to use to make authentication succeed?

Upvotes: 3

Views: 1561

Answers (2)

Filippo Baruffaldi
Filippo Baruffaldi

Reputation: 11

This problem happens when you use the Federated Login authentication method. Change it back to Google User API and re-try. It will work ;)

Upvotes: 1

Tom van Enckevort
Tom van Enckevort

Reputation: 4198

[EDIT]: Suddenly I saw a mistake in your command arguments. The URL should point to the remote_api path (i.e. --url=http://localhost:8080/remote_api).

Previous answer:

You cannot use the Google credentials you use for your live environment, as your local machine does not have a copy of the Google user db ;-)

There are two options for dealing with local authentication:

  • No authentication

    Just comment out the login requirement for the remote API in your app.yaml file:

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

    But this is not recommended as you might forget about turning it back on before you deploy.

  • Create a local admin account

    Go to http://localhost:8080/remote_api.

    Login with any email address you like and make sure you tick the "Login as admin" checkbox.

    Now start the bulkloader script as before and when asked for a login, use the email address entered before. It should not ask you for a password.

Upvotes: 4

Related Questions