Interesting error when downloading application data

289 views
Skip to first unread message

Ricardo Bánffy

unread,
Aug 13, 2011, 8:01:28 PM8/13/11
to Google App Engine
Hi.

I am having some weird problem I never encountered when trying to
replicate the server dataset on my workstation. I am trying:

appcfg.py download_data --application=[appname]
--url=http://[appname].appspot.com/_ah/remote_api
--filename=output.data

And getting

Downloading data records.
[INFO ] Logging to bulkloader-log-20110813.205612
[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-20110813.205612.sql3
[INFO ] Opening database: bulkloader-results-20110813.205612.sql3
[INFO ] Connecting to [appname].appspot.com/_ah/remote_api
Traceback (most recent call last):
File "/usr/local/bin/appcfg.py", line 76, in <module>
run_file(__file__, globals())
File "/usr/local/bin/appcfg.py", line 72, in run_file
execfile(script_path, globals_)
File "/opt/google_appengine/google/appengine/tools/appcfg.py", line
3768, in <module>
main(sys.argv)
File "/opt/google_appengine/google/appengine/tools/appcfg.py", line
3759, in main
result = AppCfgApp(argv).Run()
File "/opt/google_appengine/google/appengine/tools/appcfg.py", line
2364, in Run
self.action(self)
File "/opt/google_appengine/google/appengine/tools/appcfg.py", line
3533, in __call__
return method()
File "/opt/google_appengine/google/appengine/tools/appcfg.py", line
3339, in PerformDownload
run_fn(args)
File "/opt/google_appengine/google/appengine/tools/appcfg.py", line
3251, in RunBulkloader
sys.exit(bulkloader.Run(arg_dict))
File "/opt/google_appengine/google/appengine/tools/bulkloader.py",
line 4369, in Run
return _PerformBulkload(arg_dict)
File "/opt/google_appengine/google/appengine/tools/bulkloader.py",
line 4264, in _PerformBulkload
return_code = app.Run()
File "/opt/google_appengine/google/appengine/tools/bulkloader.py",
line 3447, in Run
kinds = self.RunPostAuthentication()
File "/opt/google_appengine/google/appengine/tools/bulkloader.py",
line 3616, in RunPostAuthentication
return self.request_manager.GetSchemaKinds()
File "/opt/google_appengine/google/appengine/tools/bulkloader.py",
line 1354, in GetSchemaKinds
global_stat = stats.GlobalStat.all().get()
File "/opt/google_appengine/google/appengine/ext/db/__init__.py",
line 1974, in get
results = self.fetch(1, config=config)
File "/opt/google_appengine/google/appengine/ext/db/__init__.py",
line 2027, in fetch
raw = raw_query.Get(limit, offset, config=config)
File "/opt/google_appengine/google/appengine/api/datastore.py", line
1504, in Get
batch = batcher.next_batch(limit)
File "/opt/google_appengine/google/appengine/datastore/datastore_query.py",
line 2299, in next_batch
batch = self.__next_batch.get_result()
File "/opt/google_appengine/google/appengine/api/apiproxy_stub_map.py",
line 592, in get_result
return self.__get_result_hook(self)
File "/opt/google_appengine/google/appengine/datastore/datastore_query.py",
line 2049, in __query_result_hook
self._conn.check_rpc_success(rpc)
File "/opt/google_appengine/google/appengine/datastore/datastore_rpc.py",
line 1074, in check_rpc_success
raise _ToDatastoreError(err)
google.appengine.api.datastore_errors.BadRequestError: app s~[appname]
cannot access app [appname]'s data

Should I worry? Should I RTFM again?

--
Ricardo Bánffy
http://www.dieblinkenlights.com
http://twitter.com/rbanffy

Tim Hoffman

unread,
Aug 13, 2011, 8:18:14 PM8/13/11
to google-a...@googlegroups.com
The s~ bit is a n artifact of running on HR.

Try the download with the s~ added to your [appid]

Its been discussed in the groups a lot, not sure if there are any docs anywhere.  (Haven't looked)

Also note there is a  new argument for the dev server 

--default_partition        Default partition to use in the APPLICATION_ID. (Default dev) which you will want to use

If you don't set it, your appid in the key will look like dev~[appid]
If you have an old dev datastore you need to set it to no value or you can't access your data

Rgds

T

Ricardo Bánffy

unread,
Aug 13, 2011, 9:41:30 PM8/13/11
to google-a...@googlegroups.com
Thanks, Tim. Worked flawlessly.

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/FjvCqhReDIgJ.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.

nalini mirajkar

unread,
May 14, 2014, 1:05:57 PM5/14/14
to google-a...@googlegroups.com
How to open the output.data file? I am assuming all the data from course (course and student data) will be in the .data file. pls provide examples to open this file.

Vinny P

unread,
May 18, 2014, 3:37:31 AM5/18/14
to google-a...@googlegroups.com
On Wed, May 14, 2014 at 12:05 PM, nalini mirajkar <mirajka...@gmail.com> wrote:
How to open the output.data file? I am assuming all the data from course (course and student data) will be in the .data file. pls provide examples to open this file.


The downloaded data is formatted as a CSV file, which can be opened by any spreadsheet application. Make sure to put the correct .csv file extension as well: https://developers.google.com/appengine/docs/python/tools/uploadingdata#Python_Downloading_data_from_App_Engine
 
 
-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com
 
Reply all
Reply to author
Forward
0 new messages