gravelBridge/AutoGPT-Web-Interaction

use playwright sync api inside

GoZippy opened this issue · 6 comments

Error using plugin

REASONING:  Using the web_interaction plugin and API calls will allow us to gather the necessary information to develop an effective marketing plan and engage with potential customers on social media.
PLAN:
-  Use 'start_browser' command to open a browser window for web interaction
-  Use 'go_to_website' command to navigate to the business's website and gather information on competitors' websites
-  Use 'make_api_call' command to gather data on the target market and competitors
-  Develop a comprehensive marketing plan that highlights the unique value proposition of the business and targets the ideal customer base
-  Use 'post_tweet' command to share marketing messages and engage with potential customers on social media
CRITICISM:  We need to ensure that the information we gather is accurate and relevant to the business's target market. We also need to be careful not to overwhelm potential customers with too many marketing messages.
NEXT ACTION:  COMMAND = start_browser ARGUMENTS = {}
  Enter 'y' to authorise command, 'y -N' to run N continuous commands, 's' to run self-feedback commands, 'n' to exit program, or enter feedback for ...
  Asking user via keyboard...
Input:y
-=-=-=-=-=-=-= COMMAND AUTHORISED BY USER -=-=-=-=-=-=-=
SYSTEM:  Command start_browser returned: Error: It looks like you are using Playwright Sync API inside the asyncio loop. Please use the Async API instead.

I have seen the same problem. AutoGPT has absolutely no idea how to use the Web-Interaction plugin. It appears the plugin, itself, has not provided sufficient instructions for its own use. It gets stuck in an infinite loop trying to start the Playwright Sync API.

My recommendation to the developer would be to thoroughly test these plugins before publishing them to the AutoGPT third-party repository. Otherwise, many people will be burning through their API budgets, especially if on continuous mode. This plugin spent $1 trying to boot itself up, and it never got anywhere. I am going to say it was probably never functional.

I recommend following the instructions, and runnning pip install playwright before actually trying to use the plugin.

I recommend following the instructions, and runnning pip install playwright before actually trying to use the plugin.

Playwright is not installed by pip unless it is included in the requirements.txt (in AutoGPT root) that is picked up by Docker. When AutoGPT is booting up (with the --install-plugin-deps switch), it clearly installed Playwright. Once AutoGPT comes to the part where the Web-Interaction plugin is required, it attempts to run "Playwright install" which is separate from the pip install. It seems to manage to do that after struggling with an npm installation, but after that, it gets locked into an eternal loop.

So you have not answered the question. This plugin is not functional.

It is functional. I've been using it, and so have tens of other people.

Could you please provide logs, or use python -m pip install playwright to install playwright into your current Python? It's a common issue.

I think you don't need to run pip install playwright but instead playwright install to get the correct browsers downloaded.

AutoGPT runs external python scripts inside a docker container, so all deps need to be placed in requirements.txt anyway