ImportError: cannot import name 'AgentStepErrorTelemetryEvent'
I followed all the instructions in Option 1 and whne it came to running python webui.py --ip 127.0.0.1 --port 7788, this came up:
INFO [browser_use] BrowserUse logging setup complete with level info
INFO [root] Anonymized telemetry enabled. See https://github.com/gregpr07/browser-use for more information.
Traceback (most recent call last):
File "/Users/kshitija/Desktop/skills/web-ui/webui.py", line 35, in <module>
from src.agent.custom_agent import CustomAgent
File "/Users/kshitija/Desktop/skills/web-ui/src/agent/custom_agent.py", line 29, in <module>
from browser_use.telemetry.views import (
ImportError: cannot import name 'AgentStepErrorTelemetryEvent' from 'browser_use.telemetry.views' (/Users/kshitija/Desktop/skills/web-ui/.venv/lib/python3.11/site-packages/browser_use/telemetry/views.py)```
same issue
pip install browser-use==0.1.18, maybe browser-use have updated
same issue
me too
pip install browser-use==0.1.18
same issue
downgrading pip install browser-use==0.1.18 did not appear to fix the issue, unfortunately. used both install methods, using uv,conda and docker environments, had issues with installation of playwright as well, had to update and manually install a few dependencies. Using native Ubuntu 24.04 (KUbuntu)
not sure why this worked as I'm unfamiliar with the uv environemnt ecosystem, but trying "uv pip install browser-use==0.1.18" from within the environment got it up and running. I can also confirm the issue arose with latest browser-use version 0.1.21
Yes I can have tried uv pip install browser-use==0.1.18 and it works but now I am stuck at this when I start the serach:
INFO [agent]
📍 Step 1
ERROR [agent] ❌ Result failed 1/3 times:
Connection error.
INFO [agent]
📍 Step 1
ERROR [agent] ❌ Result failed 2/3 times:
Connection error.
INFO [agent]
📍 Step 1
ERROR [agent] ❌ Result failed 3/3 times:
Connection error.
ERROR [agent] ❌ Stopping due to 3 consecutive failures
INFO [agent] Created GIF at agent_history.gif
INFO [src.agent.custom_agent] 🚀 Starting task: go to google.com and type 'OpenAI' click search and give me the first url
INFO [src.agent.custom_agent]
📍 Step 1
ERROR [agent] ❌ Result failed 1/5 times:
Connection error.
INFO [src.agent.custom_agent]
📍 Step 1
ERROR [agent] ❌ Result failed 2/5 times:
Connection error.
INFO [src.agent.custom_agent]
📍 Step 1
ERROR [agent] ❌ Result failed 3/5 times:
Connection error.
INFO [src.agent.custom_agent]
📍 Step 1
ERROR [agent] ❌ Result failed 4/5 times:
Connection error.
INFO [src.agent.custom_agent]
📍 Step 1
ERROR [agent] ❌ Result failed 5/5 times:
Connection error.
ERROR [agent] ❌ Stopping due to 5 consecutive failures
INFO [src.agent.custom_agent] Created GIF at agent_history.gif
^CKeyboard interruption in main thread... closing server.
WARNING [browser] Failed to force close browser context: : Event loop is closed
Future exception was never retrieved
future: <Future finished exception=Exception('Connection closed while reading from the driver')>
Exception: Connection closed while reading from the driver
WARNING [browser] Failed to force close browser context: : Event loop is closed
Future exception was never retrieved
future: <Future finished exception=Exception('Connection closed while reading from the driver')>
Exception: Connection closed while reading from the driver```
Can anyone help? Also when I select `Use Own Browser` option, it opens a blank Chrome window with nothing going on.
show me the settings on your WebUI
show me the settings on your WebUI
Do you mean the webui.py file?
pip install browser-use==0.1.18