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'

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to