commands.py: name 'play_command' is not defined
开发者_StackOverflow社区I am new to Play and GWT and following the documentation given here. But I see the following errors:
bash-3.2$ play deps test-gwt
!! Error whileloading /opt/play-1.2.1/modules/gwt-1.0/commands.py: name 'play_command' is not defined
~
~ Resolving dependencies using /Users/Harit/Documents/personal/projects/test-gwt/conf/dependencies.yml,
~
~ play->gwt 1.0 (from playLocalModules)
~
~ Installing resolved dependencies,
~
~ modules/gwt-1.0 -> /opt/play-1.2.1/modules/gwt-1.0
~
~ Done!
I see that there is a corresponding bug here, and status is fix_commited
, but I don't know what shall I do?
Isn't it just because play-gwt module is not compatible with play 1.2 ? Apparently this module is quite old and not very active and command syntax has changed in version 1.1.x or something like that.
Before, you wrote commands.py like that:
...
if play_command.startswith('gwt:'):
...
and now, it is like that:
...
MODULE = "secure"
COMMANDS = ["secure:", "secure:ov", "secure:override"]
HELP = {
"secure:": "Show help for the secure module",
"secure:override": "Override the CSS, login or layout"
}
def execute(**kargs):
command = kargs.get("command")
app = kargs.get("app")
args = kargs.get("args")
env = kargs.get("env")
if command == 'secure:':
...
In my opinion, the modification is really light so you can either ask the module owner if he would accept to do it or even do it by yourself ;)
There is also a GWT2 module which seems much more active: http://www.playframework.org/modules/gwt2 (apparently no new version since last october but the github project shows very recent commits with play1.2 support)
精彩评论