Reputation: 31
I am getting
DownloadError: ApplicationError: 2 (11004, 'getaddrinfo failed')
I'm making an API call to an application deployed on Tomcat on my machine and expecting a XML response, but doesn't work. Can someone propose a solution or an alternate route?
I am working on an IT build laptop and suspected that that could be the issue so I tried from a laptop that is not behind firewall and not on company network, but that didnt' help either.
Code Snippet:
base_url = 'http://localhost:8080/recomendations/'
url = (base_url + 'api/1.0/otherusersalsoviewed?' + urlencode(args))
req = urlfetch.fetch(url, None, urlfetch.GET, {}, False, True, 60, False)
if req.status_code==200:
root = ElementTree(fromstring(req.content)).getroot()
Any idea what is wrong?
Upvotes: 1
Views: 159
Reputation: 26925
Just in case, I was geting:
ApplicationError: 2
I fixed removing references to users.create_logout_url()
Upvotes: 0
Reputation: 8189
Note that the url you are specifying is pointing to localhost, which means 'this computer' (see http://en.wikipedia.org/wiki/Localhost), i.e. when you deploy your app to GAE localhost refer to GAE, which is meaningless.
Upvotes: 2