Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Enhance error handling in __getattr__ to catch ImportError in addition to AttributeError for improved robustness.
Magnus Müllerb87657dd22a9
diff --git a/browser_use/llm/__init__.py b/browser_use/llm/__init__.pyindex e46c208db..badaef2eb 100644--- a/browser_use/llm/__init__.py+++ b/browser_use/llm/__init__.py@@ -115,7 +115,7 @@ def __getattr__(name: str):# Cache in our clean cache dict_model_cache[name] = attrreturn attr- except AttributeError:+ except (AttributeError, ImportError):passraise AttributeError(f"module '{__name__}' has no attribute '{name}'")