AutoGPT: SYSTEM: Command browse_website returned: Error

Duplicates

  • I have searched the existing issues

Steps to reproduce 🕹

appears when it tries to brows a web site

Current behavior 😯

No response

Expected behavior 🤔

No response

Your prompt 📝

# Paste your prompt here

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

I’ve got empty errors:

···Command browse_website returned: Error: Message:···

1、在workspace.py中添加3行代码

os.environ["http_proxy"] = "http://127.0.0.1:7890"
os.environ["https_proxy"] = "http://127.0.0.1:7890"
os.environ["all_proxy"] = "socks5://127.0.0.1:7890"

2、修改browse_website函数: modify browse_website function: ./autogpt/commands/web_selenium.py:

“def` browse_website(url: str, question: str) -> tuple[str, WebDriver]:
    if 'http_proxy' in os.environ:
        del os.environ['http_proxy']

    if 'https_proxy' in os.environ:
        del os.environ['https_proxy']

    if 'all_proxy' in os.environ:
        del os.environ['all_proxy']

    """Browse a website and return the answer and links to the user

    Args:
        url (str): The url of the website to browse
        question (str): The question asked by the user

    Returns:
        Tuple[str, WebDriver]: The answer and links to the user and the webdriver
    """
    driver, text = scrape_text_with_selenium(url)
    add_header(driver)
    summary_text = summary.summarize_text(url, text, question, driver)
    links = scrape_links_with_selenium(driver, url)

    # Limit links to 5
    if len(links) > 5:
        links = links[:5]
    close_browser(driver)

    os.environ["http_proxy"] = "http://127.0.0.1:7890"
    os.environ["https_proxy"] = "http://127.0.0.1:7890"
    os.environ["all_proxy"] = "socks5://127.0.0.1:7890"

    return f"Answer gathered from website: {summary_text} \n \n Links: {links}", driver

NEXT ACTION: COMMAND = browse_website ARGUMENTS = {‘url’: ‘https://status.openai.com/’, ‘question’: ‘Are there any reported issues with the OpenAI API currently?’} SYSTEM: Command browse_website returned: Error: Message: unknown error: cannot find Chrome binary Stacktrace: Backtrace: GetHandleVerifier [0x0065DCE3+50899] (No symbol) [0x005EE111] (No symbol) [0x004F5588] (No symbol) [0x00510AAB] (No symbol) [0x0050F479] (No symbol) [0x00541FFE] (No symbol) [0x00541CEC] (No symbol) [0x0053B6F6] (No symbol) [0x00517708] (No symbol) [0x0051886D] GetHandleVerifier [0x008C3EAE+2566302] GetHandleVerifier [0x008F92B1+2784417] GetHandleVerifier [0x008F327C+2759788] GetHandleVerifier [0x006F5740+672048] (No symbol) [0x005F8872] (No symbol) [0x005F41C8] (No symbol) [0x005F42AB] (No symbol) [0x005E71B7] BaseThreadInitThunk [0x76FD6A39+25] RtlGetFullPathName_UEx [0x77C87C9D+173] RtlGetFullPathName_UEx [0x77C87C6B+123] XIAOMING THOUGHTS: Unfortunately, the ‘browse_website’ command failed to execute because Chrome is not installed. Therefore, I will manually navigate to the OpenAI GPT-3 API status page and review the information to make sure the API is operational and ready to support my article summarizer agent. REASONING: Reviewing the OpenAI GPT-3 API status page is important for the article summarizer agent to function properly. Even though the manual approach will take slightly longer, I will still have access to the information I require to make informed decisions on what to do next.

I’m on MacOS and I use Arc browser, after looking at the code of the browse_website function, it uses selenium and selenium needs the Chrome drivers apparently to work.

Source: https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/

Solution

I installed Google Chrome on my machine using brew and the problem was solved 🎉

Note : I think that it should work on all OS 👍

Tell me if it’s OK for you too

finally i fixed this one.

Most of these issues should be resolved by #1473. If your issue still exists in current master, please attach your log to an issue about your specific problem.

finally i fixed this error<SYSTEM: Command browse_website returned: Error: Message:>. SYSTEM showed an error, but no error message. My autogpt running under CMD, win 10. I think this is a particular error for those who use openai through VPN.

How i fix: Step 1: add modify code in “workspace.py” from future import annotations #this line already exist

import os

os.environ[“http_proxy”] = “http://127.0.0.1:7890” os.environ[“https_proxy”] = “http://127.0.0.1:7890” os.environ[“all_proxy”] = “socks5://127.0.0.1:7890”

Step 2: modify ./autogpt/commands/web_selenium.py:

“”“Selenium web scraping module.”“” from future import annotations

import os #add this line import logging . . . then def browse_website(url: str, question: str) -> tuple[str, WebDriver]: if ‘http_proxy’ in os.environ: #add this line del os.environ[‘http_proxy’] #add this line

if 'https_proxy' in os.environ: #add this line
    del os.environ['https_proxy'] #add this line

if 'all_proxy' in os.environ: #add this line
    del os.environ['all_proxy'] #add this line

hope this help other people

ssl_client_socket_impl.cc(992)] handshake failed; returned -1, SSL error code 1

这些是sll证书错误,可以通过配置Chrome 的option 屏蔽到这些错误,不屏蔽也没事。