Hello. I've got a Python app, that uses urllib.urlopen
. It works fine on dev_appserver.py
, but throws [Errno http error] no host given
error on my GAE production server. The code is exactly the same, the url, it connects to, is hardcoded. I'm out of ideas, what could be wrong.
UPD: the code:
def getPic(url):
sock = urllib.urlopen("http://www.quicklatex.com/latex.f?formula="+(url.replace("&", "&")))
if "0" in sock.readline() :
return sock.readline().partition(" ")[0]
else:
return ""
It fetches the page, returned by quicklatex.com website. First line contains of number of errors, second -- of link to the generated image, followed by space and a number. I'm fetching the url of the picture. The url
variable itself contains some LaTeX code.