New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_hashlib failure on Ubuntu 16.04 #73722
Comments
When executing This is the complete traceback: CPython 3.7.0a0 (default, Feb 8 2017, 03:10:42) [GCC 5.4.0 20160609] ====================================================================== Traceback (most recent call last):
File "/XXX/Lib/test/test_hashlib.py", line 623, in test_blake2b_vectors
for msg, key, md in read_vectors('blake2b'):
File "/XXX/Lib/test/test_hashlib.py", line 69, in read_vectors
parts[0] = bytes.fromhex(parts[0])
ValueError: non-hexadecimal number found in fromhex() arg at position 0 ====================================================================== Traceback (most recent call last):
File "/XXX/Lib/test/test_hashlib.py", line 648, in test_blake2s_vectors
for msg, key, md in read_vectors('blake2s'):
File "/XXX/Lib/test/test_hashlib.py", line 69, in read_vectors
parts[0] = bytes.fromhex(parts[0])
ValueError: non-hexadecimal number found in fromhex() arg at position 0 ====================================================================== Traceback (most recent call last):
File "/XXX/Lib/test/test_hashlib.py", line 659, in test_case_sha3_224_vector
for msg, md in read_vectors('sha3_224'):
File "/XXX/Lib/test/test_hashlib.py", line 69, in read_vectors
parts[0] = bytes.fromhex(parts[0])
ValueError: non-hexadecimal number found in fromhex() arg at position 0 ====================================================================== Traceback (most recent call last):
File "/XXX/Lib/test/test_hashlib.py", line 669, in test_case_sha3_256_vector
for msg, md in read_vectors('sha3_256'):
File "/XXX/Lib/test/test_hashlib.py", line 69, in read_vectors
parts[0] = bytes.fromhex(parts[0])
ValueError: non-hexadecimal number found in fromhex() arg at position 0 ====================================================================== Traceback (most recent call last):
File "/XXX/Lib/test/test_hashlib.py", line 680, in test_case_sha3_384_vector
for msg, md in read_vectors('sha3_384'):
File "/XXX/Lib/test/test_hashlib.py", line 69, in read_vectors
parts[0] = bytes.fromhex(parts[0])
ValueError: non-hexadecimal number found in fromhex() arg at position 0 ====================================================================== Traceback (most recent call last):
File "/XXX/Lib/test/test_hashlib.py", line 691, in test_case_sha3_512_vector
for msg, md in read_vectors('sha3_512'):
File "/XXX/Lib/test/test_hashlib.py", line 69, in read_vectors
parts[0] = bytes.fromhex(parts[0])
ValueError: non-hexadecimal number found in fromhex() arg at position 0 ====================================================================== Traceback (most recent call last):
File "/XXX/Lib/test/test_hashlib.py", line 703, in test_case_shake128_vector
for msg, md in read_vectors('shake_128'):
File "/XXX/Lib/test/test_hashlib.py", line 69, in read_vectors
parts[0] = bytes.fromhex(parts[0])
ValueError: non-hexadecimal number found in fromhex() arg at position 0 ====================================================================== Traceback (most recent call last):
File "/XXX/Lib/test/test_hashlib.py", line 715, in test_case_shake256_vector
for msg, md in read_vectors('shake_256'):
File "/XXX/Lib/test/test_hashlib.py", line 69, in read_vectors
parts[0] = bytes.fromhex(parts[0])
ValueError: non-hexadecimal number found in fromhex() arg at position 0 Ran 65 tests in 0.877s FAILED (errors=8, skipped=3) 1 test failed: Total duration: 1 sec |
I am using 16.10 but I can't reproduce the failures. Sachin can you reliably reproduce the failures? And one thing interesting is that all the failed test cases need the network source to be enabled but your command doesn't do that, it's better to use ./python -m test -uall -v test_hashlib. |
Looks like the tests should run if the data is already downloaded. First run needs -u urlfetch. My guess is your data is somehow corrupted. Check out your copy of the files in Lib/test/data/, compare them to e.g. <http://www.pythontest.net/hashlib/blake2b.txt\>. If you delete the files and re-run the test, you should get a fresh copy. If my theory is correct, I wonder how the data got corrupted. |
@xiang @martin |
Yeah, somehow you ended up with a broken vector file. Your file contains HTTP with JavaScript redirect. Did you attempt to download test data from a hotel or airport wifi? You can safely remove Lib/test/data and start over. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: