You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and my fix was replacing "asyncio.get_event_loop()" with a call to the following function:
def get_or_create_eventloop():
try:
return asyncio.get_event_loop()
except RuntimeError as ex:
if "There is no current event loop in thread" in str(ex):
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
return asyncio.get_event_loop()
Making the new line: return get_or_create_eventloop().run_until_complete(_get())
Not sure if this will apply to everyone but figured I'd share in case someone else runs into the issue
The text was updated successfully, but these errors were encountered:
Hey guys, after updating I kept getting the error in the title so I did a little digging and found a potential fix here - https://techoverflow.net/2020/10/01/how-to-fix-python-asyncio-runtimeerror-there-is-no-current-event-loop-in-thread/. The issue was with the following line in v2.py:
return asyncio.get_event_loop().run_until_complete(_get())
and my fix was replacing "asyncio.get_event_loop()" with a call to the following function:
Making the new line:
return get_or_create_eventloop().run_until_complete(_get())
Not sure if this will apply to everyone but figured I'd share in case someone else runs into the issue
The text was updated successfully, but these errors were encountered: