[GH-ISSUE #175] Error: No such file or directory and Multiple Function Argument Errors on Latest Updated Code #125

Closed
opened 2026-03-02 23:33:50 +03:00 by kerem · 8 comments
Owner

Originally created by @uniqueumesh on GitHub (Apr 7, 2025).
Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/175

Originally assigned to: @AJaySi on GitHub.

I'm encountering multiple errors with the current updated code. This issue was not present in the previous versions. Below are the details of the errors:

  1. Missing Required Positional Arguments:

    • The function do_google_serp_search is missing the required positional arguments status_container and update_progress.
  2. Unexpected Keyword Argument:

    • The function TavilyClient._search received an unexpected keyword argument time_range.
  3. Local Variable Access Error:

    • There is an attempt to access the local variable google_search_result which is not associated with a value.

Error Logs

2025-04-06 13:41:53 - lib.alwrity_ui.keyword_web_researcher - INFO - Starting do_web_research function
2025-04-06 13:41:53,270 - lib.alwrity_ui.keyword_web_researcher - INFO - Starting do_web_research function
2025-04-06 13:41:53 | INFO     | lib.ai_web_researcher.gpt_online_researcher:gpt_web_researcher:59 - Starting web research - Keywords: Free AI Writer, Mode: google
2025-04-06 13:41:53 | INFO     | lib.ai_web_researcher.gpt_online_researcher:gpt_web_researcher:86 - Starting Google research pipeline
2025-04-06 13:41:53 | ERROR    | lib.ai_web_researcher.gpt_online_researcher:gpt_web_researcher:136 - Research pipeline failed: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress'
2025-04-06 13:41:53 | ERROR    | lib.ai_web_researcher.gpt_online_researcher:gpt_web_researcher:246 - Failed in gpt_web_researcher: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress'
2025-04-06 13:41:53 - lib.alwrity_ui.keyword_web_researcher - ERROR - Research failed: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress'
Traceback (most recent call last):
  File "C:\Users\this\AI-Writer\lib\alwrity_ui\keyword_web_researcher.py", line 498, in do_web_research
    web_research_result = gpt_web_researcher(
                          ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\this\AI-Writer\lib\ai_web_researcher\gpt_online_researcher.py", line 91, in gpt_web_researcher
    serp_results = do_google_serp_search(search_keywords, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress'
2025-04-06 13:41:53,320 - lib.alwrity_ui.keyword_web_researcher - ERROR - Research failed: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress'
Traceback (most recent call last):
  File "C:\Users\this\AI-Writer\lib\alwrity_ui\keyword_web_researcher.py", line 498, in do_web_research
    web_research_result = gpt_web_researcher(
                          ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\this\AI-Writer\lib\ai_web_researcher\gpt_online_researcher.py", line 91, in gpt_web_researcher
    serp_results = do_google_serp_search(search_keywords, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress'
2025-04-06 13:43:25 | INFO     | lib.utils.api_key_manager.manager:__init__:26 - [APIKeyManager.__init__] Initializing API key manager
2025-04-06 13:43:25 | INFO     | lib.utils.api_key_manager.manager:load_api_keys:122 - [APIKeyManager.load_api_keys] Loading API keys from environment
2025-04-06 13:43:25 | INFO     | lib.utils.api_key_manager.manager:load_api_keys:132 - [APIKeyManager.load_api_keys] Successfully loaded API keys
2025-04-06 13:43:25,671 - __main__ - DEBUG - Environment variables loaded
2025-04-06 13:43:25,671 - __main__ - DEBUG - Setting up environment paths
2025-04-06 13:43:25,672 - __main__ - INFO - Environment paths configured successfully
2025-04-06 13:43:25,672 - __main__ - DEBUG - Environment paths configured
2025-04-06 13:43:25 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:20 - Starting API key validation process...
2025-04-06 13:43:25 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:25 - Looking for .env file at: C:\Users\this\AI-Writer\.env
2025-04-06 13:43:25 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:43 - Checking AI provider API keys...
2025-04-06 13:43:25 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:55 - Found GEMINI_API_KEY (length: 39)
2025-04-06 13:43:25 | SUCCESS  | lib.utils.api_key_manager.validation:check_all_api_keys:64 - ✓ At least one AI provider key found
2025-04-06 13:43:25 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:67 - Checking research provider API keys...
2025-04-06 13:43:25 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found TAVILY_API_KEY (length: 37)
2025-04-06 13:43:25 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found METAPHOR_API_KEY (length: 36)
2025-04-06 13:43:25 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found FIRECRAWL_API_KEY (length: 35)
2025-04-06 13:43:25 | SUCCESS  | lib.utils.api_key_manager.validation:check_all_api_keys:88 - ✓ At least one research provider key found
2025-04-06 13:43:25 | SUCCESS  | lib.utils.api_key_manager.validation:check_all_api_keys:90 - All required API keys validated successfully!
2025-04-06 13:43:25,710 - __main__ - INFO - All API keys verified
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.manager:__init__:26 - [APIKeyManager.__init__] Initializing API key manager
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.manager:load_api_keys:122 - [APIKeyManager.load_api_keys] Loading API keys from environment
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.manager:load_api_keys:132 - [APIKeyManager.load_api_keys] Successfully loaded API keys
2025-04-06 13:43:38,506 - __main__ - DEBUG - Environment variables loaded
2025-04-06 13:43:38,507 - __main__ - DEBUG - Setting up environment paths
2025-04-06 13:43:38,507 - __main__ - INFO - Environment paths configured successfully
2025-04-06 13:43:38,507 - __main__ - DEBUG - Environment paths configured
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:20 - Starting API key validation process...
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:25 - Looking for .env file at: C:\Users\this\AI-Writer\.env
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:43 - Checking AI provider API keys...
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:55 - Found GEMINI_API_KEY (length: 39)
2025-04-06 13:43:38 | SUCCESS  | lib.utils.api_key_manager.validation:check_all_api_keys:64 - ✓ At least one AI provider key found
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:67 - Checking research provider API keys...
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found TAVILY_API_KEY (length: 37)
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found METAPHOR_API_KEY (length: 36)
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found FIRECRAWL_API_KEY (length: 35)
2025-04-06 13:43:38 | SUCCESS  | lib.utils.api_key_manager.validation:check_all_api_keys:88 - ✓ At least one research provider key found
2025-04-06 13:43:38 | SUCCESS  | lib.utils.api_key_manager.validation:check_all_api_keys:90 - All required API keys validated successfully!
2025-04-06 13:43:38,554 - __main__ - INFO - All API keys verified
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.manager:__init__:26 - [APIKeyManager.__init__] Initializing API key manager
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.manager:load_api_keys:122 - [APIKeyManager.load_api_keys] Loading API keys from environment
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.manager:load_api_keys:132 - [APIKeyManager.load_api_keys] Successfully loaded API keys
2025-04-06 13:43:38,872 - __main__ - DEBUG - Environment variables loaded
2025-04-06 13:43:38,873 - __main__ - DEBUG - Setting up environment paths
2025-04-06 13:43:38,873 - __main__ - INFO - Environment paths configured successfully
2025-04-06 13:43:38,873 - __main__ - DEBUG - Environment paths configured
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:20 - Starting API key validation process...
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:25 - Looking for .env file at: C:\Users\this\AI-Writer\.env
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:43 - Checking AI provider API keys...
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:55 - Found GEMINI_API_KEY (length: 39)
2025-04-06 13:43:38 | SUCCESS  | lib.utils.api_key_manager.validation:check_all_api_keys:64 - ✓ At least one AI provider key found
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:67 - Checking research provider API keys...
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found TAVILY_API_KEY (length: 37)
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found METAPHOR_API_KEY (length: 36)
2025-04-06 13:43:38 | INFO     | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found FIRECRAWL_API_KEY (length: 35)
2025-04-06 13:43:38 | SUCCESS  | lib.utils.api_key_manager.validation:check_all_api_keys:88 - ✓ At least one research provider key found
2025-04-06 13:43:38 | SUCCESS  | lib.utils.api_key_manager.validation:check_all_api_keys:90 - All required API keys validated successfully!
2025-04-06 13:43:38,918 - __main__ - INFO - All API keys verified
2025-04-06 13:43:38 | INFO     | lib.ai_writers.keywords_to_blog_streamlit:write_blog_from_keywords:57 - Researching and Writing Blog on keywords: Top 5 AI Writer
2025-04-06 13:43:39 | ERROR    | lib.ai_writers.keywords_to_blog_streamlit:write_blog_from_keywords:71 - Failed in Google web research: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress'
2025-04-06 13:43:39 | INFO     | lib.ai_web_researcher.gpt_online_researcher:do_tavily_ai_search:336 - Doing Tavily AI search for: Top 5 AI Writer
2025-04-06 13:43:39 | INFO     | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:57 - Running Tavily search on: Top 5 AI Writer
2025-04-06 13:43:39 | ERROR    | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:89 - Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range'
2025-04-06 13:43:39 | INFO     | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:57 - Running Tavily search on: Top 5 AI Writer
2025-04-06 13:43:39 | ERROR    | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:89 - Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range'
2025-04-06 13:43:39 | INFO     | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:57 - Running Tavily search on: Top 5 AI Writer
2025-04-06 13:43:39 | ERROR    | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:89 - Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range'
2025-04-06 13:43:41 | INFO     | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:57 - Running Tavily search on: Top 5 AI Writer
2025-04-06 13:43:41 | ERROR    | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:89 - Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range'
2025-04-06 13:43:48 | INFO     | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:57 - Running Tavily search on: Top 5 AI Writer
2025-04-06 13:43:48 | ERROR    | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:89 - Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range'
2025-04-06 13:44:00 | INFO     | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:57 - Running Tavily search on: Top 5 AI Writer
2025-04-06 13:44:00 | ERROR    | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:89 - Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range'
2025-04-06 13:44:00 | ERROR    | lib.ai_web_researcher.gpt_online_researcher:do_tavily_ai_search:360 - Failed to do Tavily AI Search: RetryError[<Future at 0x24493383530 state=finished raised TypeError>]
2025-04-06 13:44:00 | ERROR    | lib.ai_writers.keywords_to_blog_streamlit:write_blog_from_keywords:94 - Failed in Google web research: cannot access local variable 'google_search_result' where it is not associated with a value
2025-04-06 13:44:00 | INFO     | lib.ai_writers.keywords_to_blog_streamlit:write_blog_from_keywords:97 - ######### Draft1: Finished Blog from Google web search: ###########
2025-04-06 13:44:00,700 - asyncio - DEBUG - Using selector: SelectSelector
2025-04-06 13:44:00 | INFO     | lib.blog_metadata.get_blog_metadata:blog_metadata:23 - Generating Content MetaData

2025-04-06 13:44:03 | INFO     | lib.blog_metadata.get_blog_metadata:generate_blog_title:61 - Generating blog title.

Screenshots

Image

Image

Steps to Reproduce

  1. Update the code to the latest version.
  2. Run the research
Originally created by @uniqueumesh on GitHub (Apr 7, 2025). Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/175 Originally assigned to: @AJaySi on GitHub. I'm encountering multiple errors with the current updated code. This issue was not present in the previous versions. Below are the details of the errors: 1. **Missing Required Positional Arguments**: - The function `do_google_serp_search` is missing the required positional arguments `status_container` and `update_progress`. 2. **Unexpected Keyword Argument**: - The function `TavilyClient._search` received an unexpected keyword argument `time_range`. 3. **Local Variable Access Error**: - There is an attempt to access the local variable `google_search_result` which is not associated with a value. ### Error Logs ``` 2025-04-06 13:41:53 - lib.alwrity_ui.keyword_web_researcher - INFO - Starting do_web_research function 2025-04-06 13:41:53,270 - lib.alwrity_ui.keyword_web_researcher - INFO - Starting do_web_research function 2025-04-06 13:41:53 | INFO | lib.ai_web_researcher.gpt_online_researcher:gpt_web_researcher:59 - Starting web research - Keywords: Free AI Writer, Mode: google 2025-04-06 13:41:53 | INFO | lib.ai_web_researcher.gpt_online_researcher:gpt_web_researcher:86 - Starting Google research pipeline 2025-04-06 13:41:53 | ERROR | lib.ai_web_researcher.gpt_online_researcher:gpt_web_researcher:136 - Research pipeline failed: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress' 2025-04-06 13:41:53 | ERROR | lib.ai_web_researcher.gpt_online_researcher:gpt_web_researcher:246 - Failed in gpt_web_researcher: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress' 2025-04-06 13:41:53 - lib.alwrity_ui.keyword_web_researcher - ERROR - Research failed: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress' Traceback (most recent call last): File "C:\Users\this\AI-Writer\lib\alwrity_ui\keyword_web_researcher.py", line 498, in do_web_research web_research_result = gpt_web_researcher( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\this\AI-Writer\lib\ai_web_researcher\gpt_online_researcher.py", line 91, in gpt_web_researcher serp_results = do_google_serp_search(search_keywords, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress' 2025-04-06 13:41:53,320 - lib.alwrity_ui.keyword_web_researcher - ERROR - Research failed: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress' Traceback (most recent call last): File "C:\Users\this\AI-Writer\lib\alwrity_ui\keyword_web_researcher.py", line 498, in do_web_research web_research_result = gpt_web_researcher( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\this\AI-Writer\lib\ai_web_researcher\gpt_online_researcher.py", line 91, in gpt_web_researcher serp_results = do_google_serp_search(search_keywords, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress' 2025-04-06 13:43:25 | INFO | lib.utils.api_key_manager.manager:__init__:26 - [APIKeyManager.__init__] Initializing API key manager 2025-04-06 13:43:25 | INFO | lib.utils.api_key_manager.manager:load_api_keys:122 - [APIKeyManager.load_api_keys] Loading API keys from environment 2025-04-06 13:43:25 | INFO | lib.utils.api_key_manager.manager:load_api_keys:132 - [APIKeyManager.load_api_keys] Successfully loaded API keys 2025-04-06 13:43:25,671 - __main__ - DEBUG - Environment variables loaded 2025-04-06 13:43:25,671 - __main__ - DEBUG - Setting up environment paths 2025-04-06 13:43:25,672 - __main__ - INFO - Environment paths configured successfully 2025-04-06 13:43:25,672 - __main__ - DEBUG - Environment paths configured 2025-04-06 13:43:25 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:20 - Starting API key validation process... 2025-04-06 13:43:25 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:25 - Looking for .env file at: C:\Users\this\AI-Writer\.env 2025-04-06 13:43:25 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:43 - Checking AI provider API keys... 2025-04-06 13:43:25 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:55 - Found GEMINI_API_KEY (length: 39) 2025-04-06 13:43:25 | SUCCESS | lib.utils.api_key_manager.validation:check_all_api_keys:64 - ✓ At least one AI provider key found 2025-04-06 13:43:25 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:67 - Checking research provider API keys... 2025-04-06 13:43:25 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found TAVILY_API_KEY (length: 37) 2025-04-06 13:43:25 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found METAPHOR_API_KEY (length: 36) 2025-04-06 13:43:25 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found FIRECRAWL_API_KEY (length: 35) 2025-04-06 13:43:25 | SUCCESS | lib.utils.api_key_manager.validation:check_all_api_keys:88 - ✓ At least one research provider key found 2025-04-06 13:43:25 | SUCCESS | lib.utils.api_key_manager.validation:check_all_api_keys:90 - All required API keys validated successfully! 2025-04-06 13:43:25,710 - __main__ - INFO - All API keys verified 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.manager:__init__:26 - [APIKeyManager.__init__] Initializing API key manager 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.manager:load_api_keys:122 - [APIKeyManager.load_api_keys] Loading API keys from environment 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.manager:load_api_keys:132 - [APIKeyManager.load_api_keys] Successfully loaded API keys 2025-04-06 13:43:38,506 - __main__ - DEBUG - Environment variables loaded 2025-04-06 13:43:38,507 - __main__ - DEBUG - Setting up environment paths 2025-04-06 13:43:38,507 - __main__ - INFO - Environment paths configured successfully 2025-04-06 13:43:38,507 - __main__ - DEBUG - Environment paths configured 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:20 - Starting API key validation process... 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:25 - Looking for .env file at: C:\Users\this\AI-Writer\.env 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:43 - Checking AI provider API keys... 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:55 - Found GEMINI_API_KEY (length: 39) 2025-04-06 13:43:38 | SUCCESS | lib.utils.api_key_manager.validation:check_all_api_keys:64 - ✓ At least one AI provider key found 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:67 - Checking research provider API keys... 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found TAVILY_API_KEY (length: 37) 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found METAPHOR_API_KEY (length: 36) 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found FIRECRAWL_API_KEY (length: 35) 2025-04-06 13:43:38 | SUCCESS | lib.utils.api_key_manager.validation:check_all_api_keys:88 - ✓ At least one research provider key found 2025-04-06 13:43:38 | SUCCESS | lib.utils.api_key_manager.validation:check_all_api_keys:90 - All required API keys validated successfully! 2025-04-06 13:43:38,554 - __main__ - INFO - All API keys verified 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.manager:__init__:26 - [APIKeyManager.__init__] Initializing API key manager 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.manager:load_api_keys:122 - [APIKeyManager.load_api_keys] Loading API keys from environment 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.manager:load_api_keys:132 - [APIKeyManager.load_api_keys] Successfully loaded API keys 2025-04-06 13:43:38,872 - __main__ - DEBUG - Environment variables loaded 2025-04-06 13:43:38,873 - __main__ - DEBUG - Setting up environment paths 2025-04-06 13:43:38,873 - __main__ - INFO - Environment paths configured successfully 2025-04-06 13:43:38,873 - __main__ - DEBUG - Environment paths configured 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:20 - Starting API key validation process... 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:25 - Looking for .env file at: C:\Users\this\AI-Writer\.env 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:43 - Checking AI provider API keys... 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:55 - Found GEMINI_API_KEY (length: 39) 2025-04-06 13:43:38 | SUCCESS | lib.utils.api_key_manager.validation:check_all_api_keys:64 - ✓ At least one AI provider key found 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:67 - Checking research provider API keys... 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found TAVILY_API_KEY (length: 37) 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found METAPHOR_API_KEY (length: 36) 2025-04-06 13:43:38 | INFO | lib.utils.api_key_manager.validation:check_all_api_keys:79 - Found FIRECRAWL_API_KEY (length: 35) 2025-04-06 13:43:38 | SUCCESS | lib.utils.api_key_manager.validation:check_all_api_keys:88 - ✓ At least one research provider key found 2025-04-06 13:43:38 | SUCCESS | lib.utils.api_key_manager.validation:check_all_api_keys:90 - All required API keys validated successfully! 2025-04-06 13:43:38,918 - __main__ - INFO - All API keys verified 2025-04-06 13:43:38 | INFO | lib.ai_writers.keywords_to_blog_streamlit:write_blog_from_keywords:57 - Researching and Writing Blog on keywords: Top 5 AI Writer 2025-04-06 13:43:39 | ERROR | lib.ai_writers.keywords_to_blog_streamlit:write_blog_from_keywords:71 - Failed in Google web research: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress' 2025-04-06 13:43:39 | INFO | lib.ai_web_researcher.gpt_online_researcher:do_tavily_ai_search:336 - Doing Tavily AI search for: Top 5 AI Writer 2025-04-06 13:43:39 | INFO | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:57 - Running Tavily search on: Top 5 AI Writer 2025-04-06 13:43:39 | ERROR | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:89 - Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range' 2025-04-06 13:43:39 | INFO | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:57 - Running Tavily search on: Top 5 AI Writer 2025-04-06 13:43:39 | ERROR | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:89 - Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range' 2025-04-06 13:43:39 | INFO | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:57 - Running Tavily search on: Top 5 AI Writer 2025-04-06 13:43:39 | ERROR | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:89 - Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range' 2025-04-06 13:43:41 | INFO | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:57 - Running Tavily search on: Top 5 AI Writer 2025-04-06 13:43:41 | ERROR | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:89 - Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range' 2025-04-06 13:43:48 | INFO | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:57 - Running Tavily search on: Top 5 AI Writer 2025-04-06 13:43:48 | ERROR | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:89 - Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range' 2025-04-06 13:44:00 | INFO | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:57 - Running Tavily search on: Top 5 AI Writer 2025-04-06 13:44:00 | ERROR | lib.ai_web_researcher.tavily_ai_search:get_tavilyai_results:89 - Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range' 2025-04-06 13:44:00 | ERROR | lib.ai_web_researcher.gpt_online_researcher:do_tavily_ai_search:360 - Failed to do Tavily AI Search: RetryError[<Future at 0x24493383530 state=finished raised TypeError>] 2025-04-06 13:44:00 | ERROR | lib.ai_writers.keywords_to_blog_streamlit:write_blog_from_keywords:94 - Failed in Google web research: cannot access local variable 'google_search_result' where it is not associated with a value 2025-04-06 13:44:00 | INFO | lib.ai_writers.keywords_to_blog_streamlit:write_blog_from_keywords:97 - ######### Draft1: Finished Blog from Google web search: ########### 2025-04-06 13:44:00,700 - asyncio - DEBUG - Using selector: SelectSelector 2025-04-06 13:44:00 | INFO | lib.blog_metadata.get_blog_metadata:blog_metadata:23 - Generating Content MetaData 2025-04-06 13:44:03 | INFO | lib.blog_metadata.get_blog_metadata:generate_blog_title:61 - Generating blog title. ``` ### Screenshots 1. ![Image](https://github.com/user-attachments/assets/c21f7279-4c0e-4ba9-b669-ae2596b0c410) 2. ![Image](https://github.com/user-attachments/assets/3fe0adfa-cc96-44e9-9a09-e7f613b2ad2d) ### Steps to Reproduce 1. Update the code to the latest version. 2. Run the research
kerem 2026-03-02 23:33:50 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@AJaySi commented on GitHub (Apr 7, 2025):

@uniqueumesh
Thanks for reporting this. I will fix and close this today.

<!-- gh-comment-id:2782289438 --> @AJaySi commented on GitHub (Apr 7, 2025): @uniqueumesh Thanks for reporting this. I will fix and close this today.
Author
Owner

@AJaySi commented on GitHub (Apr 8, 2025):

@uniqueumesh

I have uploaded latest code and MAYBE its fixed. Request for confirmation.

<!-- gh-comment-id:2787122266 --> @AJaySi commented on GitHub (Apr 8, 2025): @uniqueumesh I have uploaded latest code and *MAYBE* its fixed. Request for confirmation.
Author
Owner

@uniqueumesh commented on GitHub (Apr 9, 2025):

@AJaySi

I pulled the latest code and tried to run. I am still encountering the same issue.

2025-04-09 13:05:32 | INFO | Researching and Writing Blog on keywords: free AI writers
2025-04-09 13:05:32 | ERROR | Failed in Google web research: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress'
2025-04-09 13:05:32 | INFO | Doing Tavily AI search for: free AI writers
2025-04-09 13:05:32 | INFO | Running Tavily search on: free AI writers
2025-04-09 13:05:32 | ERROR | Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range'
2025-04-09 13:05:33 | INFO | Running Tavily search on: free AI writers
2025-04-09 13:05:33 | ERROR | Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range'
2025-04-09 13:05:35 | INFO | Running Tavily search on: free AI writers
2025-04-09 13:05:35 | ERROR | Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range'
2025-04-09 13:05:36 | INFO | Running Tavily search on: free AI writers
2025-04-09 13:05:36 | ERROR | Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range'
2025-04-09 13:05:40 | INFO | Running Tavily search on: free AI writers
2025-04-09 13:05:40 | ERROR | Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range'
2025-04-09 13:05:54 | INFO | Running Tavily search on: free AI writers
2025-04-09 13:05:54 | ERROR | Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range'
2025-04-09 13:05:54 | ERROR | Failed to do Tavily AI Search: RetryError[<Future at 0x272c655afc0 state=finished raised TypeError>]
2025-04-09 13:05:54 | ERROR | Failed in Google web research: cannot access local variable 'google_search_result' where it is not associated with a value

<!-- gh-comment-id:2788651637 --> @uniqueumesh commented on GitHub (Apr 9, 2025): @AJaySi I pulled the latest code and tried to run. I am still encountering the same issue. 2025-04-09 13:05:32 | INFO | Researching and Writing Blog on keywords: free AI writers 2025-04-09 13:05:32 | ERROR | Failed in Google web research: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress' 2025-04-09 13:05:32 | INFO | Doing Tavily AI search for: free AI writers 2025-04-09 13:05:32 | INFO | Running Tavily search on: free AI writers 2025-04-09 13:05:32 | ERROR | Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range' 2025-04-09 13:05:33 | INFO | Running Tavily search on: free AI writers 2025-04-09 13:05:33 | ERROR | Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range' 2025-04-09 13:05:35 | INFO | Running Tavily search on: free AI writers 2025-04-09 13:05:35 | ERROR | Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range' 2025-04-09 13:05:36 | INFO | Running Tavily search on: free AI writers 2025-04-09 13:05:36 | ERROR | Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range' 2025-04-09 13:05:40 | INFO | Running Tavily search on: free AI writers 2025-04-09 13:05:40 | ERROR | Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range' 2025-04-09 13:05:54 | INFO | Running Tavily search on: free AI writers 2025-04-09 13:05:54 | ERROR | Failed to do Tavily Research: TavilyClient._search() got an unexpected keyword argument 'time_range' 2025-04-09 13:05:54 | ERROR | Failed to do Tavily AI Search: RetryError[<Future at 0x272c655afc0 state=finished raised TypeError>] 2025-04-09 13:05:54 | ERROR | Failed in Google web research: cannot access local variable 'google_search_result' where it is not associated with a value
Author
Owner

@AJaySi commented on GitHub (Apr 11, 2025):

@uniqueumesh
I cloned the latest from main branch and fixed few errors. I am not getting the above errors now.
Please pull once and confirm. Thanks.

<!-- gh-comment-id:2796759353 --> @AJaySi commented on GitHub (Apr 11, 2025): @uniqueumesh I cloned the latest from main branch and fixed few errors. I am not getting the above errors now. Please pull once and confirm. Thanks.
Author
Owner

@uniqueumesh commented on GitHub (Apr 15, 2025):

@AJaySi

I cloned the latest branch and ran it. I got a following new errors.

  1. Failed in Google web research: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress'
  2. The tool failed to do Tavily research.
  3. Failed in Google web research: cannot access local variable 'google_search_result' where it is not associated with a value
  4. Tool is providing multiple titles, meta description, tags, and category related to SEO (keyword). It's not giving these results related to a provided keyword.

I have given you a screenshot to look over.

Image

Image

Image

And now the tool is asking only 3 API keys

  1. LLM
  2. Serper
  3. Tavily

Tool is successfully saving these API keys in the .env file.

<!-- gh-comment-id:2803937363 --> @uniqueumesh commented on GitHub (Apr 15, 2025): @AJaySi I cloned the latest branch and ran it. I got a following new errors. 1. Failed in Google web research: do_google_serp_search() missing 2 required positional arguments: 'status_container' and 'update_progress' 2. The tool failed to do Tavily research. 4. Failed in Google web research: cannot access local variable 'google_search_result' where it is not associated with a value 5. Tool is providing multiple titles, meta description, tags, and category related to SEO (keyword). It's not giving these results related to a provided keyword. I have given you a screenshot to look over. ![Image](https://github.com/user-attachments/assets/58262414-3d69-4fc7-bed6-b42772d81e1d) ![Image](https://github.com/user-attachments/assets/8406fdd4-f22d-48fb-ae8b-82045fd94848) ![Image](https://github.com/user-attachments/assets/b5d1b0fe-2242-465c-aa56-aebe91de7699) And now the tool is asking only 3 API keys 1. LLM 2. Serper 3. Tavily Tool is successfully saving these API keys in the .env file.
Author
Owner

@AJaySi commented on GitHub (Apr 15, 2025):

@uniqueumesh
Please file different ticket for different issues.
Its very confusing otherwise. Clubbing together all these issues in one does not reflect the hard work done.
4 issues will require a lot more work, than we can show it in 1 single issue.

NOTE: You can open as many issues as you want.

If we keep opening different issues in the same ticket, then this ticket will never get closed.
An issue should be for one type of issue like login issue is different from blog generation issue.

ALso, you have not mentioned steps, so its difficult to get started to solve it.


Lets please keep this issue only for setup process and API keys only.

<!-- gh-comment-id:2804009333 --> @AJaySi commented on GitHub (Apr 15, 2025): @uniqueumesh Please file different ticket for different issues. Its very confusing otherwise. Clubbing together all these issues in one does not reflect the hard work done. 4 issues will require a lot more work, than we can show it in 1 single issue. NOTE: You can open as many issues as you want. If we keep opening different issues in the same ticket, then this ticket will never get closed. An issue should be for one type of issue like login issue is different from blog generation issue. ALso, you have not mentioned steps, so its difficult to get started to solve it. ------------------------------------------------------------- Lets please keep this issue only for setup process and API keys only.
Author
Owner

@AJaySi commented on GitHub (Apr 23, 2025):

Closing this one, no reply from the reporter.

<!-- gh-comment-id:2823752070 --> @AJaySi commented on GitHub (Apr 23, 2025): Closing this one, no reply from the reporter.
Author
Owner

@uniqueumesh commented on GitHub (Apr 23, 2025):

@AJaySi

This error is solved. Sorry for not mentioning. There is another issue regarding the blog writer. I will open it in the new issue. Thank you

<!-- gh-comment-id:2823782037 --> @uniqueumesh commented on GitHub (Apr 23, 2025): @AJaySi This error is solved. Sorry for not mentioning. There is another issue regarding the blog writer. I will open it in the new issue. Thank you
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ALwrity#125
No description provided.