[GH-ISSUE #176] Getting this error on Mac OS. How do I install? #464

Closed
opened 2026-03-13 20:31:21 +03:00 by kerem · 9 comments
Owner

Originally created by @muditjuneja on GitHub (Apr 16, 2025).
Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/176

Originally assigned to: @AJaySi on GitHub.

ModuleNotFoundError: No module named 'lib.utils.api_key_manager.api_key_tests'
Traceback:

File "/Users/beingmudit/Work/AI-Writer/alwrity.py", line 78, in
from lib.utils.api_key_manager.api_key_manager import APIKeyManager, render
File "/Users/beingmudit/Work/AI-Writer/lib/utils/api_key_manager/init.py", line 4, in
from .api_key_manager import (
...<5 lines>...
)
File "/Users/beingmudit/Work/AI-Writer/lib/utils/api_key_manager/api_key_manager.py", line 11, in
from .components.website_setup import render_website_setup
File "/Users/beingmudit/Work/AI-Writer/lib/utils/api_key_manager/components/init.py", line 4, in
from .ai_research_setup import render_ai_research_setup
File "/Users/beingmudit/Work/AI-Writer/lib/utils/api_key_manager/components/ai_research_setup.py", line 12, in
from ..api_key_tests import (
...<5 lines>...
)

Originally created by @muditjuneja on GitHub (Apr 16, 2025). Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/176 Originally assigned to: @AJaySi on GitHub. ModuleNotFoundError: No module named 'lib.utils.api_key_manager.api_key_tests' Traceback: File "/Users/beingmudit/Work/AI-Writer/alwrity.py", line 78, in <module> from lib.utils.api_key_manager.api_key_manager import APIKeyManager, render File "/Users/beingmudit/Work/AI-Writer/lib/utils/api_key_manager/__init__.py", line 4, in <module> from .api_key_manager import ( ...<5 lines>... ) File "/Users/beingmudit/Work/AI-Writer/lib/utils/api_key_manager/api_key_manager.py", line 11, in <module> from .components.website_setup import render_website_setup File "/Users/beingmudit/Work/AI-Writer/lib/utils/api_key_manager/components/__init__.py", line 4, in <module> from .ai_research_setup import render_ai_research_setup File "/Users/beingmudit/Work/AI-Writer/lib/utils/api_key_manager/components/ai_research_setup.py", line 12, in <module> from ..api_key_tests import ( ...<5 lines>... )
kerem 2026-03-13 20:31:21 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

Hi @muditjuneja,

It seems like the issue you are facing might be related to missing or improperly configured API keys in the .env file. Here are some steps you can follow to resolve this:

Check for the .env File:

Navigate to the AI-Writer folder in your local setup and look for a file named .env.

This file should contain all the necessary API keys and environment variables required for the application to function properly.
Verify the Contents:

Open the .env file and ensure that all the required API keys are present and correctly configured.

For example, it might look something like this:
.env

Image

GPT_PROVIDER=google
METAPHOR_API_KEY=ADD_YOUR_METAPHOR_KEY_HERE
TAVILY_API_KEY=ADD_YOUR_TAVILY_KEY_HERE
SERPER_API_KEY=ADD_YOUR_SERPER_KEY_HERE
STABILITY_API_KEY=ADD_YOUR_STABILITY_KEY_HERE
GEMINI_API_KEY=ADD_YOUR_GEMINI_KEY_HERE
FIRECRAWL_API_KEY=ADD_YOUR_FIRECRAWL_KEY_HERE

Manually Add the Missing Keys (if needed):

If the file is missing or incomplete, you will need to create or update it manually.
Refer to the documentation or README (if available) for the specific keys and their expected values.

Restart the Application:

After updating or adding the .env file, restart the application to ensure the changes are applied.

If you are still encountering issues after performing these steps, feel free to share additional details or error messages here, and we’ll be happy to assist further.

Best regards,
Umesh

<!-- gh-comment-id:2808790033 --> @uniqueumesh commented on GitHub (Apr 16, 2025): Hi @muditjuneja, It seems like the issue you are facing might be related to missing or improperly configured API keys in the .env file. Here are some steps you can follow to resolve this: ### Check for the .env File: Navigate to the AI-Writer folder in your local setup and look for a file named .env. This file should contain all the necessary API keys and environment variables required for the application to function properly. Verify the Contents: Open the .env file and ensure that all the required API keys are present and correctly configured. For example, it might look something like this: .env ![Image](https://github.com/user-attachments/assets/eb96289e-0759-4d66-a915-b2d87fc6387a) GPT_PROVIDER=google METAPHOR_API_KEY=ADD_YOUR_METAPHOR_KEY_HERE TAVILY_API_KEY=ADD_YOUR_TAVILY_KEY_HERE SERPER_API_KEY=ADD_YOUR_SERPER_KEY_HERE STABILITY_API_KEY=ADD_YOUR_STABILITY_KEY_HERE GEMINI_API_KEY=ADD_YOUR_GEMINI_KEY_HERE FIRECRAWL_API_KEY=ADD_YOUR_FIRECRAWL_KEY_HERE ### Manually Add the Missing Keys (if needed): If the file is missing or incomplete, you will need to create or update it manually. Refer to the documentation or README (if available) for the specific keys and their expected values. ### Restart the Application: After updating or adding the .env file, restart the application to ensure the changes are applied. If you are still encountering issues after performing these steps, feel free to share additional details or error messages here, and we’ll be happy to assist further. Best regards, Umesh
Author
Owner

@muditjuneja commented on GitHub (Apr 16, 2025):

Hey! I think some file is missing. I have added a open ai key alread in env.

<!-- gh-comment-id:2808798968 --> @muditjuneja commented on GitHub (Apr 16, 2025): Hey! I think some file is missing. I have added a open ai key alread in env.
Author
Owner

@muditjuneja commented on GitHub (Apr 16, 2025):

from ..api_key_tests import ( test_openai_api_key, test_gemini_api_key, test_anthropic_api_key, # Keep if needed elsewhere, not used in this step currently test_deepseek_api_key, # Keep if needed elsewhere test_mistral_api_key )

These are missing.

<!-- gh-comment-id:2808802499 --> @muditjuneja commented on GitHub (Apr 16, 2025): `from ..api_key_tests import ( test_openai_api_key, test_gemini_api_key, test_anthropic_api_key, # Keep if needed elsewhere, not used in this step currently test_deepseek_api_key, # Keep if needed elsewhere test_mistral_api_key )` These are missing.
Author
Owner

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

@muditjuneja

Please give us some time, we'll look into it.

<!-- gh-comment-id:2808813139 --> @uniqueumesh commented on GitHub (Apr 16, 2025): @muditjuneja Please give us some time, we'll look into it.
Author
Owner

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

@muditjuneja @uniqueumesh
My Bad, my commit last night messed up the codebase.
I am trying to revert/Fix it. Kindly, give me till evening as I am presently busy elsewhere.

Sorry & Regards.

<!-- gh-comment-id:2808854859 --> @AJaySi commented on GitHub (Apr 16, 2025): @muditjuneja @uniqueumesh My Bad, my commit last night messed up the codebase. I am trying to revert/Fix it. Kindly, give me till evening as I am presently busy elsewhere. Sorry & Regards.
Author
Owner

@muditjuneja commented on GitHub (Apr 16, 2025):

Sure. Take your time.

<!-- gh-comment-id:2809571056 --> @muditjuneja commented on GitHub (Apr 16, 2025): Sure. Take your time.
Author
Owner

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

Sorry, I forgot to update. The install error is solved.
We have been rewriting all the modules and revamping the codebase. Social media tools are working with text & Image generation, along with AI web research.

Blog writer is WIP. Let us know which tools you would like to use and we get those rolled out sooner.

<!-- gh-comment-id:2820106569 --> @AJaySi commented on GitHub (Apr 22, 2025): Sorry, I forgot to update. The install error is solved. We have been rewriting all the modules and revamping the codebase. Social media tools are working with text & Image generation, along with AI web research. Blog writer is WIP. Let us know which tools you would like to use and we get those rolled out sooner.
Author
Owner

@Zetsu4i commented on GitHub (Apr 22, 2025):

@muditjuneja try this
#177

<!-- gh-comment-id:2821961131 --> @Zetsu4i commented on GitHub (Apr 22, 2025): @muditjuneja try this #177
Author
Owner

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

Closing this for now. The error should be resolved. Please open new issue for new ones. Thanks.

<!-- gh-comment-id:2823748525 --> @AJaySi commented on GitHub (Apr 23, 2025): Closing this for now. The error should be resolved. Please open new issue for new ones. Thanks.
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#464
No description provided.