autogen icon indicating copy to clipboard operation
autogen copied to clipboard

RuntimeError: Event loop is closed at end of execution in Magentic One Ubuntu 24

Open ghosert opened this issue 3 months ago • 6 comments

What happened?

I followed the doc to setup everything for Magentic One and run it with this sample:

╭─  gmk-ubuntu   ~/autogen/python/packages/autogen-magentic-one
╰─ python examples/example.py --logs_dir ./my_logs

it works well but in the end of the session, it reports this error:

No agent selected.
Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x7c0f158d7f60>
Traceback (most recent call last):
  File "/usr/lib/python3.12/asyncio/base_subprocess.py", line 126, in __del__
    self.close()
  File "/usr/lib/python3.12/asyncio/base_subprocess.py", line 104, in close
    proto.pipe.close()
  File "/usr/lib/python3.12/asyncio/unix_events.py", line 767, in close
    self.write_eof()
  File "/usr/lib/python3.12/asyncio/unix_events.py", line 753, in write_eof
    self._loop.call_soon(self._call_connection_lost, None)
  File "/usr/lib/python3.12/asyncio/base_events.py", line 795, in call_soon
    self._check_closed()
  File "/usr/lib/python3.12/asyncio/base_events.py", line 541, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

What did you expect to happen?

No error should be reported like above

How can we reproduce it (as minimally and precisely as possible)?

as mentioned in the above.

AutoGen version

Latest in the main branch

Which package was this bug in

Magentic One

Model used

gpt-4

Python version

3.12

Operating system

Ubuntu 24

Any additional info you think would be helpful for fixing this bug

No response

ghosert avatar Nov 12 '24 23:11 ghosert