About uploading data with appcfg.py

5 views
Skip to first unread message

ShriJ

unread,
Sep 2, 2009, 2:37:51 AM9/2/09
to Google App Engine
Hi,

I have a problem while uploading data using appcfg.py.

I have a file named videoloader.py which has the definition of the
following classes:

class Videos(db.Expando):
...

class VideoLoader(bulkload.Loader):
def __init__(self):
...

loaders = [VideoLoader]

So the same file has the class definitions of class Videos and
VideoLoader.
When I run appcfg.py with the upload_data option:
$ python appcfg.py upload_data --config_file=videoloader.py --
filename=data.csv --kind=Videos myVideoApp

I get the following error:

Traceback (most recent call last):
File "appcfg.py", line 60, in <module>
run_file(__file__, globals())
File "appcfg.py", line 57, in run_file
execfile(script_path, globals_)
File "/home/new_google_appengine/google_appengine/google/appengine/
tools/appcfg.py", line 2453, in <module>
main(sys.argv)
File "/home/new_google_appengine/google_appengine/google/appengine/
tools/appcfg.py", line 2444, in main
result = AppCfgApp(argv).Run()
File "/home/new_google_appengine/google_appengine/google/appengine/
tools/appcfg.py", line 1605, in Run
self.action(self)
File "/home/new_google_appengine/google_appengine/google/appengine/
tools/appcfg.py", line 2332, in __call__
return method()
File "/home/new_google_appengine/google_appengine/google/appengine/
tools/appcfg.py", line 2221, in PerformUpload
run_fn(args)
File "/home/new_google_appengine/google_appengine/google/appengine/
tools/appcfg.py", line 2131, in RunBulkloader
sys.exit(bulkloader.Run(arg_dict))
File "/home/new_google_appengine/google_appengine/google/appengine/
tools/bulkloader.py", line 3581, in Run
return _PerformBulkload(arg_dict)
File "/home/new_google_appengine/google_appengine/google/appengine/
tools/bulkloader.py", line 3439, in _PerformBulkload
loader = Loader.RegisteredLoader(kind)
File "/home/new_google_appengine/google_appengine/google/appengine/
tools/bulkloader.py", line 2406, in RegisteredLoader
return Loader.__loaders[kind]
KeyError: 'Videos'

Shrinand Javadekar

unread,
Sep 2, 2009, 8:16:34 PM9/2/09
to Google App Engine
Ping...

Any help would be greatly appreciated.

-Shri

Nick Johnson (Google)

unread,
Sep 3, 2009, 4:48:43 AM9/3/09
to google-a...@googlegroups.com
Hi ShriJ,

Can you please include the full definition of Videos and VideoLoader? Also, are you using app-engine-patch?

-Nick Johnson
--
Nick Johnson, Developer Programs Engineer, App Engine

Reply all
Reply to author
Forward
0 new messages