为什么我无法查看我的 Google App Engine cron 管理页面?
当我转到 http://localhost:8080/_ah/admin/cron 时,如上所述在 Google 的文档中,我得到以下信息:
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py", line 501, in __call__
handler.get(*groups)
File "C:\Program Files\Google\google_appengine\google\appengine\ext\admin\__init__.py", line 239, in get
schedule = groctimespecification.GrocTimeSpecification(entry.schedule)
File "C:\Program Files\Google\google_appengine\google\appengine\cron\groctimespecification.py", line 71, in GrocTimeSpecification
parser.period_string)
File "C:\Program Files\Google\google_appengine\google\appengine\cron\groctimespecification.py", line 122, in __init__
super(IntervalTimeSpecification, self).__init__(self)
TypeError: object.__init__() takes no parameters
我有最新的 SDK,并且看起来我的配置文件是正确的。
When I go to http://localhost:8080/_ah/admin/cron, as stated in Google's docs, I get the following:
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py", line 501, in __call__
handler.get(*groups)
File "C:\Program Files\Google\google_appengine\google\appengine\ext\admin\__init__.py", line 239, in get
schedule = groctimespecification.GrocTimeSpecification(entry.schedule)
File "C:\Program Files\Google\google_appengine\google\appengine\cron\groctimespecification.py", line 71, in GrocTimeSpecification
parser.period_string)
File "C:\Program Files\Google\google_appengine\google\appengine\cron\groctimespecification.py", line 122, in __init__
super(IntervalTimeSpecification, self).__init__(self)
TypeError: object.__init__() takes no parameters
I have the latest SDK, and it looks like my config files are correct.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这绝对是 Google App Engine 中的一个错误。 如果您检查 groctimespecification.py,您会看到
IntervalTimeSpecification
继承自TimeSpecification
,而后者又直接继承自object
并且不会重写其__init__
方法。因此,
IntervalTimeSpecification
的__init__
是不正确的:我的猜测是,有人将旧式父类 init 调用:转换
为当前的调用,但忘记了
super
,self
是隐式传递的。 正确的行应该如下所示:This is definitely a bug in Google App Engine. If you check groctimespecification.py, you'll see that
IntervalTimeSpecification
inherits fromTimeSpecification
, which in turn inherits directly fromobject
and doesn't override its__init__
method.So the
__init__
ofIntervalTimeSpecification
is incorrect:My guess is, someone converted an old-style parent class init call:
to the current one, but forgot that with
super
,self
is passed implicitly. The correct line should look like this:恭喜! 您发现了一个错误。 您可以在公共问题跟踪器上提交错误吗? 如果您想立即自行修复它,请删除该堆栈跟踪末尾引用的行中的“self”参数。
Congratulations! You've found a bug. Can you file a bug on the public issue tracker, please? If you want to fix it for yourself immediately, delete the 'self' argument in the line referenced at the end of that stacktrace.