urllib2.URLError was never imported. changed to URLError.