Closed MarcoPeretti closed 6 months ago
I receive the same error both with and without the Docker container.
At first glance, this commit appears to be the culprit:
https://github.com/assafelovic/gpt-researcher/commit/dae132ef83e50670bc05ba6ed2d329749078d373
+1
Sorry everyone, fixed now. Please run git pull
and should be resolved.
Great stuff, it works now.
Hello,
I run into an issue when trying to run the docker image on my Mac M1.
I coned the repo, set the API keys and run docker-compose up but as soon as I try to run a query I get the following error:
gpt-researcher-1 | INFO: Started server process [1] gpt-researcher-1 | INFO: Waiting for application startup. gpt-researcher-1 | INFO: Application startup complete. gpt-researcher-1 | INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) gpt-researcher-1 | INFO: ('192.168.65.1', 54857) - "WebSocket /ws" [accepted] gpt-researcher-1 | INFO: connection open gpt-researcher-1 | ERROR: Exception in ASGI application gpt-researcher-1 | Traceback (most recent call last): gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 240, in run_asgi gpt-researcher-1 | result = await self.app(self.scope, self.asgi_receive, self.asgi_send) gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in call gpt-researcher-1 | return await self.app(scope, receive, send) gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call gpt-researcher-1 | await super().call(scope, receive, send) gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 123, in call gpt-researcher-1 | await self.middleware_stack(scope, receive, send) gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 151, in call gpt-researcher-1 | await self.app(scope, receive, send) gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in call gpt-researcher-1 | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app gpt-researcher-1 | raise exc gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app gpt-researcher-1 | await app(scope, receive, sender) gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in call gpt-researcher-1 | await self.middleware_stack(scope, receive, send) gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app gpt-researcher-1 | await route.handle(scope, receive, send) gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 373, in handle gpt-researcher-1 | await self.app(scope, receive, send) gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 96, in app gpt-researcher-1 | await wrap_app_handling_exceptions(app, session)(scope, receive, send) gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app gpt-researcher-1 | raise exc gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app gpt-researcher-1 | await app(scope, receive, sender) gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 94, in app gpt-researcher-1 | await func(session) gpt-researcher-1 | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 348, in app gpt-researcher-1 | await dependant.call(**values) gpt-researcher-1 | File "/usr/src/app/backend/server.py", line 52, in websocket_endpoint gpt-researcher-1 | report = await manager.start_streaming(task, report_type, websocket) gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gpt-researcher-1 | File "/usr/src/app/backend/websocket_manager.py", line 57, in start_streaming gpt-researcher-1 | report = await run_agent(task, report_type, websocket) gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gpt-researcher-1 | File "/usr/src/app/backend/websocket_manager.py", line 74, in run_agent gpt-researcher-1 | report = await researcher.run() gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^ gpt-researcher-1 | File "/usr/src/app/backend/report_type/basic_report/basic_report.py", line 14, in run gpt-researcher-1 | researcher = GPTResearcher(self.query, self.report_type, self.source_urls, self.config_path, self.websocket) gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gpt-researcher-1 | File "/usr/src/app/gpt_researcher/master/agent.py", line 51, in init gpt-researcher-1 | self.retriever = get_retriever(self.cfg.retriever) gpt-researcher-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gpt-researcher-1 | File "/usr/src/app/gpt_researcher/master/functions.py", line 22, in get_retriever gpt-researcher-1 | from gpt_researcher.retrievers import TavilySearch gpt-researcher-1 | File "/usr/src/app/gpt_researcher/retrievers/init.py", line 2, in
gpt-researcher-1 | from .tavily_news.tavily_news import TavilyNews
gpt-researcher-1 | ModuleNotFoundError: No module named 'gpt_researcher.retrievers.tavily_news'