Invalid dispatch configuration

只谈情不闲聊 提交于 2021-01-29 04:45:12

问题


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.


回答1:


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.




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/24534418/invalid-dispatch-configuration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!