Error with openhab(?) py script 100_DirectoryTrigger.py after Update to 4.0.1

I asked the question about performance here, think that it fits better into that thread: