How to fix RuntimeError: There is no current event loop in thread in Python | DevErrors