This repository was archived by the owner on May 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
This repository was archived by the owner on May 24, 2023. It is now read-only.
"Update Categories" fails when using unicode domains #11
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The application fails to update domain categories when it is tracking a unicode domain. The following error is displayed in the console:
[+] Starting update of $UNICODE_DOMAIN
20:01:16 [Q] ERROR Failed [autumn-three-steak-earth] - name 'error' is not defined : Traceback (most recent call last):
File "/home/USER/Code/Shepherd/modules/review.py", line 126, in check_ibm_xforce
req = self.session.get(xforce_api_uri, headers=headers, verify=False)
File "/home/USER/.local/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/home/USER/.local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/home/USER/.local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/home/USER/.local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/home/USER/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen
chunked=chunked)
File "/home/USER/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 355, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.7/http/client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1270, in _send_request
self.putheader(hdr, value)
File "/usr/lib/python3.7/http/client.py", line 1202, in putheader
values[i] = one_value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 54-55: ordinal not in range(256)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/USER/.local/lib/python3.7/site-packages/django_q/cluster.py", line 381, in worker
res = f(*task['args'], **task['kwargs'])
File "/home/USER/Code/Shepherd/tasks.py", line 105, in check_domains
lab_results = domain_review.check_domain_status()
File "/home/USER/Code/Shepherd/modules/review.py", line 450, in check_domain_status
xforce_results = self.check_ibm_xforce(domain_name)
File "/home/USER/Code/Shepherd/modules/review.py", line 143, in check_ibm_xforce
print('[!] IBM X-Force request failed: {}'.format(error))
NameError: name 'error' is not defined
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working