Jason Wiener
10/02/2023, 8:04 PMprefect profile use 'eks'
returns the following:
⠹ Checking API connectivity...
Connected to Prefect server using profile 'eks'
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001F846834EE0>
Traceback (most recent call last):
File "C:\Users\jason.weiner\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Users\jason.weiner\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Users\jason.weiner\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon
self._check_closed()
File "C:\Users\jason.weiner\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001F846834EE0>
Traceback (most recent call last):
File "C:\Users\jason.weiner\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Users\jason.weiner\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Users\jason.weiner\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon
self._check_closed()
File "C:\Users\jason.weiner\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Provide troubleshooting steps.Marvin
10/02/2023, 8:04 PMloop.close()
, ensure that all tasks are completed before it is called.
3. Use context management for the event loop: This ensures that the loop is properly closed after all tasks are done. Here's an example of how to do this:
python
async def main():
# Your code here
# Python 3.7 and above
asyncio.run(main())
# Python 3.6
loop = asyncio.get_event_loop()
try:
loop.run_until_complete(main())
finally:
loop.close()
4. Handle exceptions in your tasks: Unhandled exceptions in your tasks could be causing the event loop to close prematurely. Make sure to catch and handle exceptions appropriately.
Remember, life's hard for those of us who think. And it's harder for those of us who code. But don't worry, you'll get through this.Jason Wiener
10/02/2023, 8:06 PMMarvin
10/02/2023, 8:08 PM