Cannot pickle '_io.TextIOWrapper' object

Hi all!
I took the .py files from CheckMK (


and placed it in /omd/sites/<site_name>/local/share/check_mk/checks/
and I get the error:
Error running automation call try-inventory (exit code 2), error:
cannot pickle ‘_io.TextIOWrapper’ object

I’m running the raw edition and I’m using the apache_status.py file as the second file gives me syntax errors.

How do I fix this? Thanks in advance!

Try puttin it in /usr/lib/check_mk_agent/plugins and the apache_status.cfg from that site goes into /etc/check_mk/