Event.source or system.gui strange error

Install my (free) Simulation Aids module from the Showcase. Then these will magically work. For an in-depth explication of the situation with PyComponentWrapper, see this topic: