Splunk Dev

[Python] ValueError: unsupported hash type

jwoger_splunk
Splunk Employee
Splunk Employee

I have found that on some of my instances and later versions of splunk that have version 2.7 of Python bundled, when trying to execute my python scripts using splunk's bundled python libraries, i get the following error and the script does not execute.

"/Applications/splunk6.2/splunk/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Applications/splunk6.2/splunk/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/Applications/splunk6.2/splunk/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Applications/splunk6.2/splunk/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/Applications/splunk6.2/splunk/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Applications/splunk6.2/splunk/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/Applications/splunk6.2/splunk/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Applications/splunk6.2/splunk/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/Applications/splunk6.2/splunk/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Applications/splunk6.2/splunk/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/Applications/splunk6.2/splunk/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/Applications/splunk6.2/splunk/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512

How can i fix this error?

1 Solution

RicoSuave
Builder

This is because The python2.7 package is dependent to the libssl1_0_0 package (openssl_1.0 runtime librairies). Your OS is missing these. Install them and it will get rid of this error.

View solution in original post

jeremiahc4
Builder

I marked this as a "me too", however, it seems that while python dumps out these messages, the script continues on and does what it is supposed to do. So, it's just noise rather than broken for me.

0 Karma

RicoSuave
Builder

This is because The python2.7 package is dependent to the libssl1_0_0 package (openssl_1.0 runtime librairies). Your OS is missing these. Install them and it will get rid of this error.

hierros
Explorer

Wouldn't using openssl_1.0, make you vulnerable to "Heartbleed"?

bhawkins1
Communicator

Yes. A better answer would be "just don't do anything ssl-related with splunk's built-in python"

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...