I am getting the ApplicationError: 2 nonnumeric port: '' randomly for about 1/10th of my url request, the rest work fine, I seen this is a bug but I have yet to find any solutions, anyone have any thoughts in why this is occurring? I am running python 2.5.4 and google app engine 1.3.3
here is some generic code the error is occuring when requesting pages randomly
def overview(page):
try:
page = "http://www.url.com%s.json?" %page
u = urllib.urlopen(page.encode('utf-8'))
bytes = StringIO(u.read())
u.close()
except Exception, e:
print e
return None
try:
JSON_data = json.load(bytes)
return JSON_data
except ValueError:
print "Couldn't get .json for %s" % page
return None