You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If http check is supplied with wrong url, say http:/example.com with one slash,
task fails with uncaught exception.
[2014-01-22 16:23:29,156: ERROR/MainProcess] Task app.cabotapp.tasks.run_status_check[190292be-0630-4781-9700-921ba6ae3ad0] raised unexpected: AttributeError("'NoneType' object has no attribute 'encode'",)
Traceback (most recent call last):
File "/home/ubuntu/venv/local/lib/python2.7/site-packages/celery/app/trace.py", line 238, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/ubuntu/venv/local/lib/python2.7/site-packages/celery/app/trace.py", line 416, in __protected_call__
return self.run(*args, **kwargs)
File "/home/ubuntu/2014-01-18-65148c3/app/cabotapp/tasks.py", line 42, in run_status_check
check.run()
File "/home/ubuntu/2014-01-18-65148c3/app/cabotapp/models.py", line 466, in run
auth=auth
File "/home/ubuntu/venv/local/lib/python2.7/site-packages/requests/api.py", line 65, in get
return request('get', url, **kwargs)
File "/home/ubuntu/venv/local/lib/python2.7/site-packages/requests/safe_mode.py", line 39, in wrapped
return function(method, url, **kwargs)
File "/home/ubuntu/venv/local/lib/python2.7/site-packages/requests/api.py", line 51, in request
return session.request(method=method, url=url, **kwargs)
File "/home/ubuntu/venv/local/lib/python2.7/site-packages/requests/sessions.py", line 241, in request
r.send(prefetch=prefetch)
File "/home/ubuntu/venv/local/lib/python2.7/site-packages/requests/models.py", line 629, in send
timeout=self.timeout,
File "/home/ubuntu/venv/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 415, in urlopen
body=body, headers=headers)
File "/home/ubuntu/venv/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 267, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python2.7/httplib.py", line 958, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 986, in _send_request
self.putrequest(method, url, **skips)
File "/usr/lib/python2.7/httplib.py", line 896, in putrequest
host_enc = self.host.encode("ascii")
AttributeError: 'NoneType' object has no attribute 'encode'
The text was updated successfully, but these errors were encountered:
Well I guess there are two options: either make sure we validate the URL properly in the first place (we'll have to do manually as currently we're using a TextField for the URL) or just catch this exception and show as a failed check with some appropriate logging of the error. I'm probably in favour of the latter as we should be catching exceptions anyway.
If http check is supplied with wrong url, say http:/example.com with one slash,
task fails with uncaught exception.
The text was updated successfully, but these errors were encountered: