Thanks for trying to help me debug this.
Here's my new code:
#req = urllib2.Request('http://www.python.org/fish.html')
#req = urllib2.Request('http://www.apejet.org/aaron/blog/feed/')
req = urllib2.Request('http://news.ycombinator.com/rss')
try:
response = urllib2.urlopen(req)
rss = response.read()
self.response.out.write("Read: " + rss)
except urllib2.HTTPError, e:
self.response.out.write("Error: ")
self.response.out.write(e.code)
self.response.out.write(e.read())
Using python.org.fish.html and running locally, it throws the
exception and prints Error: 404....
Running it on appspot.com, I get the same.
Using the apejet.org feed and running locally, it doesn't throw any
exceptions and prints Read....
Running this version on appspot.com, I get the same.
Finally, using the ycombinator.com feed and running locally, no
exception and prints Read: <rss version="2.0">....
Running this version on appspot.com, I get the (uncaught) error from
my previous post.
If I change the except line to handle any Exception, it gets caught
but simply as an "ApplicationError: 2".
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---