Task #2495
Task #2484: Python 3 support
Test failures when attempting to authenticate
Start date:
11/06/2019
Due date:
% Done:
100%
Description
ant test.run_unit -Dtest=TestFormAuthentication.test_form_auth
[exec] Exception happened during processing of request from ('127.0.0.1', 58261) [exec] Traceback (most recent call last): [exec] File "/Users/lmurphey/Splunk/py3/lib/python3.7/socketserver.py", line 316, in _handle_request_noblock [exec] self.process_request(request, client_address) [exec] File "/Users/lmurphey/Splunk/py3/lib/python3.7/socketserver.py", line 347, in process_request [exec] self.finish_request(request, client_address) [exec] File "/Users/lmurphey/Splunk/py3/lib/python3.7/socketserver.py", line 360, in finish_request [exec] self.RequestHandlerClass(request, client_address, self) [exec] File "/Users/lmurphey/Splunk/py3/lib/python3.7/socketserver.py", line 720, in __init__ [exec] self.handle() [exec] File "/Users/lmurphey/Splunk/py3/lib/python3.7/http/server.py", line 426, in handle [exec] self.handle_one_request() [exec] File "/Users/lmurphey/Splunk/py3/lib/python3.7/http/server.py", line 414, in handle_one_request [exec] method() [exec] File "/Users/lmurphey/git/splunk-web-input/tests/test_web_server.py", line 123, in do_POST [exec] authenticated_successfully = self.authenticate() [exec] File "/Users/lmurphey/git/splunk-web-input/tests/test_web_server.py", line 78, in authenticate [exec] postvars = cgi.parse_qs(self.rfile.read(length), keep_blank_values=1) [exec] File "/Users/lmurphey/Splunk/py3/lib/python3.7/cgi.py", line 193, in parse_qs [exec] return urllib.parse.parse_qs(qs, keep_blank_values, strict_parsing) [exec] File "/Users/lmurphey/Splunk/py3/lib/python3.7/urllib/parse.py", line 675, in parse_qs [exec] max_num_fields=max_num_fields) [exec] File "/Users/lmurphey/Splunk/py3/lib/python3.7/urllib/parse.py", line 740, in parse_qsl [exec] value = _coerce_result(value) [exec] File "/Users/lmurphey/Splunk/py3/lib/python3.7/urllib/parse.py", line 103, in _encode_result [exec] return obj.encode(encoding, errors) [exec] UnicodeEncodeError: 'ascii' codec can't encode character '\u2713' in position 0: ordinal not in range(128)
Associated revisions
Fixing more test failures
Reference #2495
History
#1 Updated by Luke Murphey about 5 years ago
Questions:
- At what point is the code failing?
- postvars = cgi.parse_qs(self.rfile.read(length), keep_blank_values=1)
- Does then authentication request work in the actual code?
- Getting DeprecationWarning: cgi.parse_qs is deprecated, use urllib.parse.parse_qs instead
#2 Updated by Luke Murphey about 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100