yasyf / gpt-do

GPT-powered bash commands.
https://pypi.org/project/gpt-do/
216 stars 11 forks source link

When using ChatGPT: ModuleNotFoundError: No module named 'playwright' #7

Closed engineersamuel closed 1 year ago

engineersamuel commented 1 year ago

When executing the following command with the chatgpt model: ddo whats the highest CPU process --model=chatgpt

I receive the following error:

Traceback (most recent call last):
  File "/opt/homebrew/bin/ddo", line 8, in <module>
    sys.exit(do())
  File "/opt/homebrew/Cellar/do/0.1.16/libexec/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/Cellar/do/0.1.16/libexec/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/Cellar/do/0.1.16/libexec/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/Cellar/do/0.1.16/libexec/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/homebrew/Cellar/do/0.1.16/libexec/lib/python3.10/site-packages/gpt_do/cli.py", line 49, in do
    do = get_doer(model)(debug=debug)
  File "/opt/homebrew/Cellar/do/0.1.16/libexec/lib/python3.10/site-packages/gpt_do/cli.py", line 8, in get_doer
    from gpt_do.doers.pywright_doer import PywrightDoer
  File "/opt/homebrew/Cellar/do/0.1.16/libexec/lib/python3.10/site-packages/gpt_do/doers/pywright_doer.py", line 2, in <module>
    from gpt_do.vendor.chatgpt_wrapper.chatgpt_wrapper import ChatGPT
  File "/opt/homebrew/Cellar/do/0.1.16/libexec/lib/python3.10/site-packages/gpt_do/vendor/chatgpt_wrapper/chatgpt_wrapper/__init__.py", line 1, in <module>
    from .chatgpt import ChatGPT
  File "/opt/homebrew/Cellar/do/0.1.16/libexec/lib/python3.10/site-packages/gpt_do/vendor/chatgpt_wrapper/chatgpt_wrapper/chatgpt.py", line 19, in <module>
    from playwright.sync_api import sync_playwright
ModuleNotFoundError: No module named 'playwright'

I assume the installation scripts of gpt-do is missing playwright in the requirements.

yasyf commented 1 year ago

@engineersamuel how did you install do? If with brew, try doing brew install yasyf/do/do --with-playwright

engineersamuel commented 1 year ago

I did not, thank you for the suggestion, let me reinstall with that.