Closed trangrta closed 2 months ago
I cannot reproduce the same error. Make sure you have assigned the correct environment variables. Based on the source code, the following variables must be set for googleSerp
to work properly. I think you set a wrong retriever or API key. Here are the correct settings:
RETRIEVER=googleSerp
SERPER_API_KEY=You can get a key at https://serper.dev/
I'm run code detailed report and getting the following error:
File "d:\rtGIT\rta-aiteam\TEST\test1.py", line 25, in _initial_research await main_task_assistant.conduct_research() File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\gpt_researcher\master\agent.py", line 107, in conduct_research context = await self.get_context_by_search(self.query) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\gpt_researcher\master\agent.py", line 202, in get_context_by_search context = await asyncio.gather(*[self.__process_sub_query(sub_query, scraped_data) for sub_query in sub_queries])
File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\gpt_researcher\master\agent.py", line 219, in process_sub_query scraped_data = await self.__scrape_data_by_query(sub_query) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\gpt_researcher\master\agent.py", line 256, in scrape_data_by_query search_results = retriever.search( ^^^^^^^^^^^^^^^^^ File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\gpt_researcher\retrievers\serper\serper.py", line 77, in search "body": result["snippet"],