Thread.isAlive has been removed in 3.9 and only is_alive could be called. The current problem is '_MainThread' object has no attribute 'isAlive'