This fixes the exception:
Traceback (most recent call last):
File "/omd/sites/stable/share/check_mk/modules/check_mk.py", line 5065, in <module>
discover_marked_hosts()
File "/omd/sites/stable/share/check_mk/modules/discovery.py", line 441, in discover_marked_hosts
why_not = may_rediscover(params)
File "/omd/sites/stable/share/check_mk/modules/discovery.py", line 389, in may_rediscover
now = datetime.datetime.utcfromtimestamp(now_ts)
NameError: global name 'datetime' is not defined
To the list of all Werks