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
Hey, I'm trying to run some code to send some emails, however, I am already using the event loop for another task. When I try running the line loop.run_until_complete(smtp.connect())
I get the following error " RuntimeError: This event loop is already running ".
The text was updated successfully, but these errors were encountered:
As @skillian pointed out, if the loop is already running, don't use loop.run_until_complete. If you're in an async function, just use await; otherwise, I would use loop.create_task.
Hey, I'm trying to run some code to send some emails, however, I am already using the event loop for another task. When I try running the line
loop.run_until_complete(smtp.connect())
I get the following error " RuntimeError: This event loop is already running ".
The text was updated successfully, but these errors were encountered: