The error is due to the Event object not being defined in your code. In Python, the Event object comes from the threading module, but it seems that you haven't imported it in your Object_Avoidence.py script.