Upload data to development server

123 views
Skip to first unread message

rc

unread,
Sep 21, 2009, 10:01:10 AM9/21/09
to Google App Engine
Hi,

I am new to the Google app engine. I have developed a simple app which
has a datastore component. I want to upload some data to the
development server. I am using the 'appcfg.py upload_data' but I am
getting a login/password prompt and I am not sure what to put there. I
tried using my gmail a/c & password but that fails.
Could you please let me know what I am missing here?

Thanks
rc


Uploading data records.

[INFO ] Logging to bulkloader-log-20090921.085252

[INFO ] Throttling transfers:

[INFO ] Bandwidth: 250000 bytes/second

[INFO ] HTTP connections: 8/second

[INFO ] Entities inserted/fetched/modified: 20/second

[INFO ] Opening database: bulkloader-progress-20090921.085252.sql3

Please enter login credentials for localhost

Email: r*****@gmail.com

Password for r*****@gmail.com:

[INFO ] Connecting to localhost:8080/remote_api

[ERROR ] Exception during authentication

Traceback (most recent call last):

File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/bulkloader.py",
line 2985, in Run

request_manager.Authenticate()

File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/bulkloader.py",
line 1152, in Authenticate

remote_api_stub.MaybeInvokeAuthentication()

File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/remote_api/remote_api_stub.py",
line 494, in MaybeInvokeAuthentication

datastore_stub._server.Send(datastore_stub._path, payload=None)

File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/appengine_rpc.py",
line 344, in Send

f = self.opener.open(req)

File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py",
line 374, in open

response = self._open(req, data)

File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py",
line 392, in _open

'_open', req)

File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py",
line 353, in _call_chain

result = func(*args)

File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py",
line 1100, in http_open

return self.do_open(httplib.HTTPConnection, req)

File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py",
line 1075, in do_open

raise URLError(err)

URLError: <urlopen error (61, 'Connection refused')>

[INFO ] Authentication Failed

Jeff S (Google)

unread,
Sep 22, 2009, 1:57:54 PM9/22/09
to google-a...@googlegroups.com
Hi rc,

The upload_data command is designed for pushing data into the hosted application, on appspot, and might not be usable with the local SDK server. Authentication is particular is handled differently in the local SDK than in App Engine.

Thank you,

Jeff

Jeff S (Google)

unread,
Sep 25, 2009, 9:51:02 PM9/25/09
to google-a...@googlegroups.com
Hello again rc,

Apologies, it seems I was too hasty in my reply. Nick has pointed out that we do in fact document how to upload data into the development server. Please see:

http://code.google.com/appengine/docs/python/tools/uploadingdata.html#Loading_Data_Into_the_Development_Server

Thank you,

Jeff

cabhishek

unread,
Nov 1, 2009, 3:44:39 PM11/1/09
to Google App Engine
I get this error when i follow the link above

Abhishek-Kapatkars-MacBook-Pro:helloworld cabhishek$ appcfg.py
upload_data
--config_file=content_loader.py --filename=data2.csv --kind=Album
--url=http://localhost:8080/remote_api /Users/cabhishek/Documents/
workspace/helloworld
Application: abhishekkapatkar; version: 5.
Uploading data records.
[INFO ] Logging to bulkloader-log-20091101.153226
[INFO ] Throttling transfers:
[INFO ] Bandwidth: 250000 bytes/second
[INFO ] HTTP connections: 8/second
[INFO ] Entities inserted/fetched/modified: 20/second
[INFO ] Opening database: bulkloader-progress-20091101.153226.sql3
Please enter login credentials for localhost
Email: cabh...@gmail.com
Password for cabh...@gmail.com:
[INFO ] Connecting to localhost:8080/remote_api
[ERROR ] Exception during authentication
Traceback (most recent call last):
File
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/bulkloader.py",
line 3063, in Run
self.request_manager.Authenticate()
File
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/bulkloader.py",
line 1148, in Authenticate
remote_api_stub.MaybeInvokeAuthentication()
File
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/remote_api/remote_api_stub.py",
line 545, in MaybeInvokeAuthentication
datastore_stub._server.Send(datastore_stub._path, payload=None)
File
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/appengine_rpc.py",
line 344, in Send
f = self.opener.open(req)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py",
line 387, in open
response = meth(req, response)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py",
line 498, in http_response
'http', request, response, code, msg, hdrs)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py",
line 425, in error
return self._call_chain(*args)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py",
line 360, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py",
line 506, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Exception encountered handling request
[INFO ] Authentication Failed

.. i even tried this Abhishek-Kapatkars-MacBook-Pro:helloworld
cabhishek$ rm ~/.appcfg_cookies

nothing worked....

On Sep 25, 8:51 pm, "Jeff S (Google)" <j...@google.com> wrote:
> Hello again rc,
>
> Apologies, it seems I was too hasty in my reply. Nick has pointed out that
> we do in fact document how to upload data into the development server.
> Please see:
>
> http://code.google.com/appengine/docs/python/tools/uploadingdata.html...
> >> Email: r**...@gmail.com
>
> >> Password for r**...@gmail.com:

Conchi

unread,
Nov 16, 2009, 4:40:52 AM11/16/09
to Google App Engine
Next worked for me:

- removing the line

login:admin

from app.yaml

- Updating app cofig:

appcfg.py update [app-id]

- (Re)starting local server:

appserver [app-id]

- Upload data:

appcfg.py upload_data --config_file=album_loader.py --filename
album_data.csv --kind Album --url=http://localhost:8080/remote_api ../
[app-id]

When ask for mail and password type anything

Renan

unread,
Jul 21, 2011, 12:48:24 AM7/21/11
to google-a...@googlegroups.com
OMG!

IT WORKS!!!!!!!!!!! I develop with Java SDK App Engine

I just download the Charles Proxy app (Mac OSX), run it and use the command line:
./appcfg.py upload_data --application=myapplicationid --filename=data/mydatastorebackup.cvs --url=http://localhost:8888/remote_api

I don't know why and how it works! BUT WORKS!

Roch Delsalle

unread,
Aug 4, 2011, 6:25:25 PM8/4/11
to google-a...@googlegroups.com
Lol, wow I just did the same and it solved my problem.

Oliver Billing

unread,
May 15, 2012, 10:10:22 AM5/15/12
to google-a...@googlegroups.com
Could you give me a hint on how I download all of my APPstore data and load it into my localhost. I want a better test environment

I am downloading like this
appcfg.py download_data --application=s~crime-syndicate --url=<remote api> --filename=test

But uploading like this
appcfg.py upload_data --application=crime-syndicate --filename=test --url=http://localhost:8888/cp_remote_api --email=<email> --passin

fails with
error: [Errno 54] Connection reset by peer and

Am I using the correct data types. Filename test is in some kind of sql3 stuff
Reply all
Reply to author
Forward
0 new messages