aider icon indicating copy to clipboard operation
aider copied to clipboard

Uncaught ModuleNotFoundError in scrape.py line 134

Open DevUniM opened this issue 1 year ago • 1 comments

Aider version: 0.57.1 Python version: 3.12.6 Platform: Windows-11-10.0.22631-SP0 Python implementation: CPython Virtual environment: No OS: Windows 11 (64bit) Git version: git version 2.46.2.windows.1

An uncaught exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "__main__.py", line 7, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 709, in main
    coder.run()
  File "base_coder.py", line 723, in run
    self.run_one(user_message, preproc)
  File "base_coder.py", line 760, in run_one
    message = self.preproc_user_input(user_message)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "base_coder.py", line 752, in preproc_user_input
    self.check_for_urls(inp)
  File "base_coder.py", line 787, in check_for_urls
    inp += self.commands.cmd_web(url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "commands.py", line 156, in cmd_web
    content = self.scraper.scrape(url) or ""
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "scrape.py", line 97, in scrape
    content, mime_type = self.scrape_with_playwright(url)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "scrape.py", line 134, in scrape_with_playwright
    import playwright  # noqa: F401
    ^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'playwright'

DevUniM avatar Sep 26 '24 20:09 DevUniM

Thank you for filing this issue.

Can you please try to install or reinstall aider in a separate Python environment? Either with venv or pipx?

Please remove the existing environment/aider installation first, e.g. with pipx:

$ pipx uninstall aider-chat
uninstalled aider-chat! ✨ 🌟 ✨
$ pipx install aider-chat
  installed package aider-chat 0.57.1, installed using Python 3.12.6
  These apps are now globally available
    - aider
done! ✨ 🌟 ✨

This document may be helpful -> https://aider.chat/docs/troubleshooting/imports.html

fry69 avatar Sep 26 '24 20:09 fry69

I'm closing this issue for now.

If any new related concerns arise, please feel free to comment, and I'll reopen the issue.

fry69 avatar Oct 05 '24 12:10 fry69