命令.py:名称“play_command”没有定义

发布于 2024-11-05 13:46:39 字数 693 浏览 1 评论 0原文

我是 Play 和 GWT 的新手,并遵循此处提供的文档。但我看到以下错误:

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!

我发现这里有一个相应的错误,并且状态是 fix_commited,但我不知道该怎么办?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月野兔 2024-11-12 13:46:39

是不是因为 play-gwt 模块与 play 1.2 不兼容?
显然这个模块已经很老了,不是很活跃,命令语法在 1.1.x 版本或类似的版本中已经改变。

以前,你是这样写commands.py的:

...
if play_command.startswith('gwt:'):
...

现在,是这样的:

...
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:':
...

在我看来,修改真的很轻,所以你可以询问模块所有者是否接受这样做,甚至可以自己做;)

还有一个看起来更活跃的 GWT2 模块: http://www.playframework.org/modules/gwt2 (显然自去年 10 月以来没有新版本,但 github 项目显示了最近提交的 play1.2 支持)

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文