Code Monkey home page Code Monkey logo

Comments (5)

scottmoney avatar scottmoney commented on July 17, 2024

I tried to add a PR but I can't

index f9d2110..28c666b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -29,3 +29,4 @@ mistune
python-docx
htmldocx
langchain-google-genai
+lxml[html_clean]

from gpt-researcher.

arces avatar arces commented on July 17, 2024

+1 just tried to build now and getting the same error when I try to run it

from gpt-researcher.

scottmoney avatar scottmoney commented on July 17, 2024

I tried to add a PR but I can't

index f9d2110..28c666b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,3 +29,4 @@ mistune python-docx htmldocx langchain-google-genai +lxml[html_clean]

I was able to add a PR

from gpt-researcher.

scottmoney avatar scottmoney commented on July 17, 2024

Looks like this may be duplicate of #418

from gpt-researcher.

arces avatar arces commented on July 17, 2024

I ran the following and ran into the error below.

#!/bin/sh
 git clone [email protected]:assafelovic/gpt-researcher.git
 cd gpt-researcher
 docker compose build
 docker compose up

NOTE: I have my .env populated

Adding lxml[html_clean] to the requirements.txt solved the problem.

WARN[0000] /home/smoney/src/aigency/gpt-researcher/gpt-researcher/docker-compose.yml: version is obsolete
gpt-researcher-1 | Traceback (most recent call last):
gpt-researcher-1 | File "/usr/local/bin/uvicorn", line 8, in
gpt-researcher-1 | sys.exit(main())
gpt-researcher-1 | ^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in call
gpt-researcher-1 | return self.main(*args, **kwargs)
gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
gpt-researcher-1 | rv = self.invoke(ctx)
gpt-researcher-1 | ^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
gpt-researcher-1 | return ctx.invoke(self.callback, **ctx.params)
gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
gpt-researcher-1 | return __callback(*args, **kwargs)
gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 409, in main
gpt-researcher-1 | run(
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 575, in run
gpt-researcher-1 | server.run()
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 65, in run
gpt-researcher-1 | return asyncio.run(self.serve(sockets=sockets))
gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
gpt-researcher-1 | return runner.run(main)
gpt-researcher-1 | ^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
gpt-researcher-1 | return self._loop.run_until_complete(task)
gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
gpt-researcher-1 | return future.result()
gpt-researcher-1 | ^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve
gpt-researcher-1 | await self._serve(sockets)
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 76, in _serve
gpt-researcher-1 | config.load()
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/config.py", line 433, in load
gpt-researcher-1 | self.loaded_app = import_from_string(self.app)
gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string
gpt-researcher-1 | module = importlib.import_module(module_str)
gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module
gpt-researcher-1 | return _bootstrap._gcd_import(name[level:], package, level)
gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gpt-researcher-1 | File "", line 1204, in _gcd_import
gpt-researcher-1 | File "", line 1176, in _find_and_load
gpt-researcher-1 | File "", line 1147, in _find_and_load_unlocked
gpt-researcher-1 | File "", line 690, in _load_unlocked
gpt-researcher-1 | File "", line 940, in exec_module
gpt-researcher-1 | File "", line 241, in _call_with_frames_removed
gpt-researcher-1 | File "/usr/src/app/main.py", line 1, in
gpt-researcher-1 | from backend.server import app
gpt-researcher-1 | File "/usr/src/app/backend/server.py", line 7, in
gpt-researcher-1 | from gpt_researcher.utils.websocket_manager import WebSocketManager
gpt-researcher-1 | File "/usr/src/app/gpt_researcher/init.py", line 1, in
gpt-researcher-1 | from .master import GPTResearcher
gpt-researcher-1 | File "/usr/src/app/gpt_researcher/master/init.py", line 1, in
gpt-researcher-1 | from .agent import GPTResearcher
gpt-researcher-1 | File "/usr/src/app/gpt_researcher/master/agent.py", line 4, in
gpt-researcher-1 | from gpt_researcher.master.functions import *
gpt-researcher-1 | File "/usr/src/app/gpt_researcher/master/functions.py", line 7, in
gpt-researcher-1 | from gpt_researcher.scraper.scraper import Scraper
gpt-researcher-1 | File "/usr/src/app/gpt_researcher/scraper/init.py", line 3, in
gpt-researcher-1 | from .newspaper.newspaper import NewspaperScraper
gpt-researcher-1 | File "/usr/src/app/gpt_researcher/scraper/newspaper/newspaper.py", line 1, in
gpt-researcher-1 | from newspaper import Article
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/newspaper/init.py", line 10, in
gpt-researcher-1 | from .api import (build, build_article, fulltext, hot, languages,
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/newspaper/api.py", line 14, in
gpt-researcher-1 | from .article import Article
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/newspaper/article.py", line 15, in
gpt-researcher-1 | from . import network
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/newspaper/network.py", line 14, in
gpt-researcher-1 | from .configuration import Configuration
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/newspaper/configuration.py", line 15, in
gpt-researcher-1 | from .parsers import Parser
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/newspaper/parsers.py", line 12, in
gpt-researcher-1 | import lxml.html.clean
gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/lxml/html/clean.py", line 18, in
gpt-researcher-1 | raise ImportError(
gpt-researcher-1 | ImportError: lxml.html.clean module is now a separate project lxml_html_clean.
gpt-researcher-1 | Install lxml[html_clean] or lxml_html_clean directly.

Look here, a temporary fix for now
#418 (comment)

from gpt-researcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.