Why can't I view the cron admin page for Google App Engine?

When I go to http: // localhost: 8080 / _ah / admin / cron as stated in the google docs I get this:

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.

+1


a source to share


2 answers


This is definitely a bug in Google App Engine. If you check groctimespecification.py , you can see what IntervalTimeSpecification

inherits from TimeSpecification

, which in turn inherits directly from object

and does not override its method __init__

.

So __init__

of IntervalTimeSpecification

is wrong:

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

      

I'm guessing someone translated the 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__()

      

+4


a source


Congratulations! You have found a bug. Can you find a bug in the public tracker please? If you want to fix this for yourself immediately, remove the "self" argument on the line at the end of this stacktrace.



+3


a source







All Articles