Short tip: OMD and Python error 'TypeError: 'frozenset' object is not callable'
When configuring and testing a Python Icinga plugin within an OMD site, I stumbled upon the following error recently:
1TypeError: 'frozenset' object is not callable
After some tests on other systems, I found out, that the Python library hashlib
shipped with OMD seems to be faulty. Copying the system-wide library into the OMD site did the trick for me:
1# cp /opt/omd/sites/$site/lib/python/hashlib.py /opt/omd/sites/$site/lib/python/hashlib.py.initial
2# cp /usr/lib64/python2.7/hashlib.py /opt/omd/sites/$site/lib/python/hashlib.py
Note
$site
needs to replaced with the name of your OMD site.
Under CentOS, the package python-libs
needs to installed to ensure that the file mentioned above is available.