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
---------- MagenticOneOrchestrator ----------
Please attempt to access a reputable weather website, such as Weather.com, AccuWeather, or the Bureau of Meteorology (bom.gov.au), to find the UV index in Melbourne today. Provide a summary if successful.
---------- WebSurfer ----------
Web surfing error:
Traceback (most recent call last):
File "c:\Users\neerajsr\Projects\Agents.venv\Lib\site-packages\autogen_ext\agents\web_surfer_multimodal_web_surfer.py", line 408, in on_messages_stream
content = await self._generate_reply(cancellation_token=cancellation_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\neerajsr\Projects\Agents.venv\Lib\site-packages\autogen_ext\agents\web_surfer_multimodal_web_surfer.py", line 435, in _generate_reply
await self._lazy_init()
File "c:\Users\neerajsr\Projects\Agents.venv\Lib\site-packages\autogen_ext\agents\web_surfer_multimodal_web_surfer.py", line 285, in _lazy_init
self._playwright = await async_playwright().start()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\neerajsr\Projects\Agents.venv\Lib\site-packages\playwright\async_api_context_manager.py", line 51, in start
return await self.aenter()
^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\neerajsr\Projects\Agents.venv\Lib\site-packages\playwright\async_api_context_manager.py", line 46, in aenter
playwright = AsyncPlaywright(next(iter(done)).result())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\futures.py", line 203, in result
raise self._exception.with_traceback(self._exception_tb)
File "c:\Users\neerajsr\Projects\Agents.venv\Lib\site-packages\playwright_impl_transport.py", line 120, in connect
self._proc = await asyncio.create_subprocess_exec(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\subprocess.py", line 223, in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 1708, in subprocess_exec
transport = await self._make_subprocess_transport(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 503, in _make_subprocess_transport
raise NotImplementedError
NotImplementedError
What did you expect to happen?
Expect the code to return response.
How can we reproduce it (as minimally and precisely as possible)?
You can reproduce this on Windows machine with python 3.11.9
Looks like some issue with Playwright using an not implemented asyncio event loop on Windows. cc @afourney, not sure if this is an issue with AutoGen.
@Neeraj-Sr can you confirm you have completed the following steps:
create a virtual environment with python 3.10+
activate virtual environment
Run pip install autogen-agentchat autogen-ext[magentic-one,openai]
Run playwright install --with-deps chromium
Run the following script:
importasynciofromautogen_ext.models.openaiimportOpenAIChatCompletionClientfromautogen_agentchat.teamsimportMagenticOneGroupChatfromautogen_agentchat.uiimportConsolefromautogen_ext.agents.web_surferimportMultimodalWebSurferasyncdefmain() ->None:
model_client=OpenAIChatCompletionClient(model="gpt-4o")
surfer=MultimodalWebSurfer(
"WebSurfer",
model_client=model_client,
)
team=MagenticOneGroupChat([surfer], model_client=model_client)
awaitConsole(team.run_stream(task="What is the UV index in Melbourne today?"))
asyncio.run(main())
What happened?
I trying to run this code provided as sample here https://github.com/microsoft/autogen/tree/main/python/packages/autogen-magentic-one .
However the execution fails with the following error.
---------- MagenticOneOrchestrator ----------
Please attempt to access a reputable weather website, such as Weather.com, AccuWeather, or the Bureau of Meteorology (bom.gov.au), to find the UV index in Melbourne today. Provide a summary if successful.
---------- WebSurfer ----------
Web surfing error:
Traceback (most recent call last):
File "c:\Users\neerajsr\Projects\Agents.venv\Lib\site-packages\autogen_ext\agents\web_surfer_multimodal_web_surfer.py", line 408, in on_messages_stream
content = await self._generate_reply(cancellation_token=cancellation_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\neerajsr\Projects\Agents.venv\Lib\site-packages\autogen_ext\agents\web_surfer_multimodal_web_surfer.py", line 435, in _generate_reply
await self._lazy_init()
File "c:\Users\neerajsr\Projects\Agents.venv\Lib\site-packages\autogen_ext\agents\web_surfer_multimodal_web_surfer.py", line 285, in _lazy_init
self._playwright = await async_playwright().start()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\neerajsr\Projects\Agents.venv\Lib\site-packages\playwright\async_api_context_manager.py", line 51, in start
return await self.aenter()
^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\neerajsr\Projects\Agents.venv\Lib\site-packages\playwright\async_api_context_manager.py", line 46, in aenter
playwright = AsyncPlaywright(next(iter(done)).result())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\futures.py", line 203, in result
raise self._exception.with_traceback(self._exception_tb)
File "c:\Users\neerajsr\Projects\Agents.venv\Lib\site-packages\playwright_impl_transport.py", line 120, in connect
self._proc = await asyncio.create_subprocess_exec(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\subprocess.py", line 223, in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 1708, in subprocess_exec
transport = await self._make_subprocess_transport(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 503, in _make_subprocess_transport
raise NotImplementedError
NotImplementedError
What did you expect to happen?
Expect the code to return response.
How can we reproduce it (as minimally and precisely as possible)?
You can reproduce this on Windows machine with python 3.11.9
AutoGen version
autogen-agentchat==0.4.5 autogen-core==0.4.5 autogen-ext==0.4.5
Which package was this bug in
Core
Model used
gpt-4o
Python version
3.11.9
Operating system
Windows 11 Enterprise
Any additional info you think would be helpful for fixing this bug
No response
The text was updated successfully, but these errors were encountered: