1

I'm attempting to update an application which takes advantage of two modules (default and batchratings).

After running 'appcfg update app.yaml batchratings.yaml', I receive the following output:

Error 400: --- begin server output --- Validation error: Invalid dispatch configuration - module 'batchratings' does not exist. Upload a version of this module and try again.

Given that that's precisely what I'm attempting to do by following the steps outlined in the Modules walkthrough, I'm fairly certain I'm overlooking something obvious.

The source is available here: https://dl.dropboxusercontent.com/u/7537204/literumble.zip, if that helps anyone.

I'd be very appreciative if anyone had some insight to provide regarding which direction I should be looking to ferret out the issue.

3 Answers3

5

I had the same issue, I was trying to do something like:

appcfg.py update <my_app_dir> app.yaml batchratings.yaml

but the appcfg.py help update shows that if you pass a directory it will always take app.yaml. To take the other modules you need to use the file path for each:

appcfg.py update <my_app_dir>/app.yaml
appcfg.py update <my_app_dir>/batchratings.yaml

To figure this out, it helped me to pass -v to make sure it was updating the module i passed.

CarlosJ
  • 63
  • 3
  • 8
1

If your app has modules then, rather than running appcfg.py my_app_dir, you can instead cd my_app_dir and then run appcfg.py app.yaml mod1.yaml mod2.yaml etc.

Do not run appcfg.py *.yaml otherwise you risk including dispatch.yaml, if present, because that will fail with "Unexpected attribute 'dispatch' for object of type AppInfoExternal".

And be sure to run appcfg.py update_dispatch . afterwards, to upload dispatch entries.

jarmod
  • 71,565
  • 16
  • 115
  • 122
0

I first thought it had something to do with the app.yaml not having the modules, but that's incorrect as per the examples I'm looking at.

I think it may actually be a very silly thing, in which your dispatch.yaml is pointing to 'batchratings' but your actual module name is 'BatchRankings.py'. Notice the capitalization.

Albert
  • 605
  • 3
  • 7
  • 12
  • I've eyeballed that a few times myself, but feel 'fairly' confident that batchratings.yaml should define the module as batchratings, and dispatch should associate the url (BatchRankings) with the batchratings module. Having said that, it won't hurt to see what happens if they all share the same (case-sensitive) name. – Timothy Moore Jul 02 '14 at 15:49
  • I'm trying to reproduce it here and will update shortly. – Albert Jul 02 '14 at 15:52
  • I've had no luck with a global rename of all associated resources to 'batchrankings'. I'll continue to update this thread as I poke at the issue. – Timothy Moore Jul 02 '14 at 16:17
  • 1
    I believe I may have isolated the issue. I was running appcfg.py out of `'Program Files/Google/Cloud SDK/google-cloud-sdk/platform/google_appengine/'` rather than from the application directory. Though this may not be the last of my issues, for whatever reason that seemed to resolve my inability to upload the module. – Timothy Moore Jul 02 '14 at 16:51