Open rmcc4444 opened 1 month ago
Fixed. But I will keep this here in case anyone else has the problem. I missed renaming example.env to .env.
Having the same issue.
Hey Ramila. See my solution above.
I have the same problem, but .env file is named appropriately unlike @rmcc4444 did you solve this? @RamilaWijesuriya
I have the same issue, when I run it in CLI mode it fails giving an error from the models.py file. Here is the traceback, it seems like it always looks for an API key for OpenAI.
Traceback (most recent call last):
File "/Users/m/code/agent-zero/run_cli.py", line 100, in <module>
config = initialize()
^^^^^^^^^^^^
File "/Users/m/code/agent-zero/initialize.py", line 7, in initialize
chat_llm = models.get_openai_chat(model_name="gpt-4o-mini", temperature=0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/m/code/agent-zero/models.py", line 51, in get_openai_chat
return ChatOpenAI(model_name=model_name, temperature=temperature, api_key=api_key) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/m/miniconda3/envs/a0/lib/python3.12/site-packages/langchain_core/load/serializable.py", line 113, in __init__
super().__init__(*args, **kwargs)
File "/Users/m/miniconda3/envs/a0/lib/python3.12/site-packages/pydantic/v1/main.py", line 341, in __init__
raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for ChatOpenAI
__root__
Did not find openai_api_key, please add an environment variable `OPENAI_API_KEY` which contains it, or pass `openai_api_key` as a named parameter. (type=value_error)
I solved it with help of chatGPT 4o - it wasnt finding my API key, here are the steps that worked for me: in powershell: $env:OPENAI_API_KEY = "your-api-key-here" (even though it was clearly in the .env file - so not sure why I had to do this. My next problem is that while docker was running in the backgroud, logged in, it wasnt acting as if logged in, so I had to then follow these instructions to get logged into docker - just had to enter my email address and password after "docker login" command in powershell. (note - I was tricked as did not know that password does not show when typed, but it is actually there, just hit enter) The error you're encountering indicates that Docker is trying to pull the frdel/agent-zero-exe image from Docker Hub, but it’s failing due to an authentication issue—likely because Docker Desktop isn't signed in properly, or the credentials are incorrect.
Steps to Resolve the Issue: Check Docker Desktop Login:
Open Docker Desktop. Make sure you are signed in with the correct Docker Hub credentials. If you're not signed in, log in with your Docker Hub username and password. If you're already signed in, try logging out and logging back in again to refresh the session. Verify Docker Hub Access:
Ensure that the Docker Hub account you're using has access to the frdel/agent-zero-exe image. If the image is private, verify you have the correct permissions or credentials to access it. Docker Hub CLI Login (Optional): If logging in via Docker Desktop doesn't resolve the issue, you can try logging in via the command line:
bash Copy code docker login This will prompt you for your Docker Hub credentials (username and password). Once successfully logged in, try running Agent Zero again.
Test Image Pull Manually: To verify if Docker can access the image, you can try pulling the image manually using the following command:
bash Copy code docker pull frdel/agent-zero-exe:latest If this pull succeeds, Docker should be able to proceed with the setup. If it fails, it might confirm the issue is related to authentication.
Once you’ve resolved the login issue, try running Agent Zero again by using python run_ui.py.
i have the same issue, but actually couldn´t fix it. got renamed properly the .env, already have paste in api key for open ai but still getting this error:
Does anybody has a solution?
I went into the initialize.py file. You have to comment out the lines for the controller agents based on which API key you're using
On Sun, Sep 29, 2024, 05:33 MaxmilianH @.***> wrote:
i have the same issue, but actually couldn´t fix it. got renamed properly the .env, already have paste in api key for open ai but still getting this error:
Does anybody has a solution? Bildschirmfoto.2024-09-29.um.11.30.15.png (view on web) https://github.com/user-attachments/assets/6ce71719-3552-4ac0-98a5-1e3f28fb1a44
— Reply to this email directly, view it on GitHub https://github.com/frdel/agent-zero/issues/149#issuecomment-2381283649, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACLWA5W2ZUW3GP4LPSIIJ63ZY7CP5AVCNFSM6AAAAABOWQTOFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBRGI4DGNRUHE . You are receiving this because you commented.Message ID: @.***>
It looks like it's connected because STATUS is CONNECTED but no matter what I click or do, nothing ever displays. I have tried multiple web browsers. I followed the instructions in the readme file here on Github. I'm using Windows 11. See screenshot below. Any ideas? thanks