Random “[Errno -2] Name or service not known” errors
问题 I am populating a local database using a third party service. I have a list of urls (around 500). I am calling each url in a loop, and updating my database with the returned data. The code flow looks like this: for url in urllist: req = urllib.urlopen(url) data = json.loads(req.read()) req.close() #update the db using data here Whenever I run this piece of code, the script fails at random points with the error message "Name or service not known". This doesn't have anything with the urls