views:

144

answers:

2

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.

+2  A: 

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.

Nick Johnson
Did you try that? It didn't work for me, I think it's because I'm using 2.6, I'm downloading 2.5.4 right now to see if that fixes it.
MStodd
No, I checked the source, and verified that it's definitely a bug. :)
Nick Johnson
For future reference, this has been fixed now (I'm on 1.2.8).
fiXedd
+2  A: 

This is definitely a bug in Google App Engine. If you check groctimespecification.py, you'll see that IntervalTimeSpecification inherits from TimeSpecification, which in turn inherits directly from object and doesn't override its __init__ method.

So the __init__ of IntervalTimeSpecification is incorrect:

class IntervalTimeSpecification(TimeSpecification):
  def __init__(self, interval, period):
    super(IntervalTimeSpecification, self).__init__(self)

My guess is, someone converted an old-style parent class init call:

TimeSpecification.__init__(self)

to the current one, but forgot that with super, self is passed implicitly. The correct line should look like this:

super(IntervalTimeSpecification, self).__init__()
DzinX