views:

35

answers:

1

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.

A: 

Have you tried reviewing the URL Fetch documentation? Can you show us the URL?

Hank Gay
I added a code snippet.
folone
That was the problem, thanks.
folone