Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Fix source

magmuellerfd93df4bd488
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.py
index 73a72d678..c29380a44 100644
--- a/browser_use/agent/service.py
+++ b/browser_use/agent/service.py
@@ -361,11 +361,11 @@ class Agent:
model_name = 'Unknown'
try:
- import browser_use
+ import pkg_resources
- version = browser_use.__version__ # type: ignore
+ version = pkg_resources.get_distribution('browser-use').version
source = 'pip'
- except AttributeError:
+ except Exception:
try:
import subprocess
@@ -376,7 +376,7 @@ class Agent:
except Exception:
version = 'unknown'
source = 'unknown'
-
+ logger.debug(f'Version: {version}, Source: {source}')
self.telemetry.capture(
AgentRunTelemetryEvent(
agent_id=self.agent_id,
diff --git a/pyproject.toml b/pyproject.toml
index 2bc445cf4..e2cf42a32 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ description = "Make websites accessible for AI agents"
authors = [
{ name = "Gregor Zunic" }
]
-version = "0.1.19"
+version = "0.1.21"
readme = "README.md"
requires-python = ">=3.11"
classifiers = [
@@ -26,7 +26,8 @@ dependencies = [
"python-dotenv>=1.0.1",
"requests>=2.32.3",
"posthog>=3.7.0",
- "playwright>=1.49.0"
+ "playwright>=1.49.0",
+ "setuptools>=75.8.0"
]
[project.optional-dependencies]