Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SYSTEM: Command browse_website returned: Error #1079

Closed
1 task done
thomasmunoz opened this issue Apr 13, 2023 · 17 comments
Closed
1 task done

SYSTEM: Command browse_website returned: Error #1079

thomasmunoz opened this issue Apr 13, 2023 · 17 comments
Labels
bug Something isn't working function: browse

Comments

@thomasmunoz
Copy link

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
@YHrhhh
Copy link

YHrhhh commented Apr 15, 2023

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.

@adevinwild
Copy link

adevinwild commented Apr 15, 2023

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

@JingyuQian
Copy link

I had the problem while deploying on a barebone VM. You need to have both chromedriver and chrome binary on your system.

The former is easy since the program will install it for you if there isn't one.
The latter, you need to install it yourself:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb

(Optionally you might need to fix some broken dependencies for chrome: sudo apt --fix-broken install)

NOTE if your system doesn't have X display, chrome will crash. In that case refer to #1517 to add 2 launch options in the code.

@aetherwu
Copy link

I've got empty errors:

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

@413x45h4w
Copy link

My autogpt gets stuck on an endless loop here as well.

@oldwhite83
Copy link

I've got empty errors:
···Command browse_website returned: Error: Message:···

Hello, have you solved this problem? I have encountered the same problem

Hello, have you solved this problem? I have encountered the same problem

@adevinwild
Copy link

Try to :

  • Install chrome (or chrome drivers)
  • Check that you have OpenAI credits( Usage tab)

@413x45h4w
Copy link

@adevinwild those aren't the issue for me

@kratoszmx
Copy link

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

@Pwuts
Copy link
Member

Pwuts commented Apr 19, 2023

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.

@Pwuts Pwuts closed this as completed Apr 19, 2023
@Pwuts Pwuts added function: browse bug Something isn't working labels Apr 19, 2023
@oldwhite83
Copy link

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

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

@WangPeterXF
Copy link

想问一下在workspace.py中添加的3行代码:
(I would like to ask about the 3 lines of code added to workspace.py:)
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"

是添加在什么位置吗?还是说添加在任何位置都行?
(Is it added in any position? Or can I add it anywhere?)

@WangPeterXF
Copy link

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

@kratoszmx
Copy link

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

对的,应该import一下os库

@oppiet30
Copy link

oppiet30 commented Apr 22, 2023

I've got empty errors:

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

You have to be running in a gui and have chrome browser installed or set the browser option in the .env file. Or set the browser variable to Firefox or Opera.

@herrinx
Copy link

herrinx commented Apr 28, 2023

This was annoying me. I'm on windows. This fixed it for me.

IF you run into it, do this.

Go here and download the appropriate webdriver for your version of chrome. https://chromedriver.chromium.org/downloads
Extract it and save the binary to your AI root folder or wherever.

Then run this command from a command prompt. setx PATH "%PATH%;C:\WebDriver\bin" where the c:\ whatever is your ai folder. For me the command was setx PATH "%PATH%;K:\AI"

reboot or restart cmd prompt

From a command prompt, type echo %PATH% ensure it includes that folder.

From a command prompt, type chromedriver.exe

If it runs, you are good to go

@gsultanshah
Copy link

brew

Thanks, it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working function: browse
Projects
None yet
Development

No branches or pull requests