Friday, January 9, 2009

 

Trying to avoid urlfetch errors in Google App Engine



I was having urlfetch download errors in my newsfeed aggregator India Hot News.

Modified code:

try:
result = urlfetch.fetch(url)
except urlfetch.Error():
continue


This seems to work temporarily.

Earlier the code was

try:
result = urlfetch.fetch(url)
except Exception:
continue


This "Exception" was working yesterday.
Gave Server Error today.

Let me see the modified code works fine or not.
This urlfetch errors are real glitches in Google App Engine.

Comments:
How can python catch urlfetch.Error, but not the global python Exception? This dont make sense!
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?