Skip to content

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

fix syntax errors

Nick Sweetinge2e278da95f1
diff --git a/examples/custom-functions/file_upload.py b/examples/custom-functions/file_upload.py
index e2bc72fc6..3948e312c 100644
--- a/examples/custom-functions/file_upload.py
+++ b/examples/custom-functions/file_upload.py
@@ -20,7 +20,7 @@ logger = logging.getLogger(__name__)
browser = Browser(
config=BrowserConfig(
headless=False,
- browser_binary_path=='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
+ browser_binary_path='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
)
)
controller = Controller()
@@ -84,7 +84,7 @@ def create_file(file_type: str = 'txt'):
async def main():
- task = f'Go to https://kzmpmkh2zfk1ojnpxfn1.lite.vusercontent.net/ and - read the file content and upload them to fields'
+ task = 'Go to https://kzmpmkh2zfk1ojnpxfn1.lite.vusercontent.net/ and - read the file content and upload them to fields'
available_file_paths = [create_file('txt'), create_file('pdf'), create_file('csv')]
diff --git a/examples/features/result_processing.py b/examples/features/result_processing.py
index 92c84ea9d..07f485161 100644
--- a/examples/features/result_processing.py
+++ b/examples/features/result_processing.py
@@ -3,7 +3,6 @@ import sys
from pprint import pprint
from browser_use.browser.browser import Browser, BrowserConfig, BrowserContextConfig
-)
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import asyncio
diff --git a/tests/test_models.py b/tests/test_models.py
index 0d5f30b7e..a3865ce9f 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -126,7 +126,7 @@ async def test_model_search(llm, context):
try:
response = requests.get('http://127.0.0.1:11434/')
if response.status_code != 200:
- raise
+ raise Exception('Ollama is not running - start with `ollama start`')
except Exception:
raise Exception('Ollama is not running - start with `ollama start`')