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

Never able to run sucessfully on MacOS with Python3.10 #24

Open
zhj-buffer opened this issue Feb 26, 2025 · 1 comment
Open

Never able to run sucessfully on MacOS with Python3.10 #24

zhj-buffer opened this issue Feb 26, 2025 · 1 comment

Comments

@zhj-buffer
Copy link

_run_code(code, mod_globals, init_globals, File "/opt/homebrew/Cellar/python@3.10/3.10.16/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/opt/homebrew/bin/auto", line 5, in <module> from autoagent.cli import cli File "/Users/alanz/Downloads/AutoAgent/autoagent/__init__.py", line 1, in <module> from .core import MetaChain File "/Users/alanz/Downloads/AutoAgent/autoagent/core.py", line 21, in <module> from .logger import MetaChainLogger, LoggerManager File "/Users/alanz/Downloads/AutoAgent/autoagent/logger.py", line 6, in <module> from constant import DEBUG, DEFAULT_LOG, LOG_PATH, MC_MODE ⠋ Creating environment... ⠹ Creating environment...

Could anyone help share the env that able to deply and experice with this project? I'm trying to run on my MacBook.

Another issue with opening the Brower.

return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1443, in invoke return ctx.invoke(self.callback, **ctx.params) File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 788, in invoke return __callback(*args, **kwargs) File "/Users/alanz/Downloads/AutoAgent/autoagent/cli.py", line 191, in main code_env, web_env, file_env = create_environment(docker_config) File "/Users/alanz/Downloads/AutoAgent/autoagent/cli.py", line 151, in create_environment web_env = BrowserEnv(browsergym_eval_env = None, local_root=docker_config.local_root, workplace_name=docker_config.workplace_name) File "/Users/alanz/Downloads/AutoAgent/autoagent/environment/browser_env.py", line 368, in __init__ self.init_browser() File "/opt/homebrew/lib/python3.10/site-packages/tenacity/__init__.py", line 336, in wrapped_f return copy(f, *args, **kw) File "/opt/homebrew/lib/python3.10/site-packages/tenacity/__init__.py", line 475, in __call__ do = self.iter(retry_state=retry_state) File "/opt/homebrew/lib/python3.10/site-packages/tenacity/__init__.py", line 376, in iter result = action(retry_state) File "/opt/homebrew/lib/python3.10/site-packages/tenacity/__init__.py", line 419, in exc_check raise retry_exc from fut.exception() tenacity.RetryError: RetryError[<Future at 0x32e8dfee0 state=finished raised BrowserInitException>] alanz@alanz-mlt AutoAgent %

@tjb-tech
Copy link
Collaborator

tjb-tech commented Feb 28, 2025

DEFAULT_LOG

Hello, thanks for your interests and I have setup our AutoAgent from a brand new macbook, then I find out the main issue you may encounter. In summary, after finishing the installation setup in the README, you may also need to:

  1. install ffmpeg
brew install ffmpeg # install in macos
  1. update the playwright, and chromium
pip install playwright --upgrade
python -m playwright install --force chromium
  1. Set headless mode of browser to save resources. In detail, we have set headless=True when initialzing the browser. In https://github.com/HKUDS/AutoAgent/blob/main/autoagent/environment/browser_env.py
            env = gym.make(
                'browsergym/openended',
                task_kwargs={'start_url': 'about:blank', 'goal': 'PLACEHOLDER_GOAL'},
                wait_for_user_message=False,
                headless=True,
                disable_env_checker=True,
                tags_to_mark='all',
                action_mapping = action_mapping
            )

If you still face another issue, please feel free to post your error messages here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants