2
votes

I have a project on Google App Engine. It has 2 separate data-stores one which holds articles and the other holds any article which is classified as a crime. (True or False)

But when I try and run my cron to move the crime articles into the "crime" data-store I receive this error:

Has anyone experienced this and how did they over come it!?

0kb AppEngine-Google;
0.1.0.1 - - [22/Apr/2011:09:47:02 -0700] "GET /place HTTP/1.1" 500 138 - "AppEngine-Google; (+http://code.google.com/appengine)" "geo-event-maps.appspot.com" ms=1642 cpu_ms=801 api_cpu_ms=404 cpm_usd=0.022761 queue_name=__cron task_name=740b13ec69de6ac36b81ff431d584a1a loading_request=1

As a result my cron fails.

2
I believe that message just indicates that the request handler at '/place' raised an error. Have you tried initiating the request independently (outside of cron) to see if you could get a more detailed error message? - Kevin P
Expand the log entry - it should contain a stacktrace telling you exactly what went wrong. - Nick Johnson

2 Answers

2
votes

I just had a similar problem where my cron was crashing due to the fact that it was finding an non-ascii character and not able to process it? Try encode('utf-8'). My cron's work ok without needing the login URL, but it's a good tip for future :-)

Just my 2 cents worth for your question ;-)

1
votes

It's probably not related to cron. Trying to load your URL directly (http://geo-event-maps.appspot.com/place) returns an HTTP 500 error. As an admin of the app, you should be able to run any cron job without error just by pasting the URL into a browser, so start there.

By the way, make sure to require admin access to any cron URLs. As an unauthorized user I should have received a 401 error, not a 500. Even if you use just one handler, you can do something like this in your app.yaml:

- url: /cron/.*
  script: main.py
  login: admin

- url: /.*
  script: main.py