Dear Agno Community/Support Team,
I’m encountering an issue with the agno library when using the Gemini model and would appreciate your assistance or insights.
While running the following code, which previously worked without issues, I now receive an AttributeError: ‘NoneType’ object has no attribute ‘update’:
python
`from agno.agent import Agent, RunResponse
from agno.models.google import Gemini
from dotenv import load_dotenv
import os
load_dotenv()
api_key = os.getenv(“GEMINI_API_KEY”)
agent = Agent(model=Gemini(id=“gemini-2.0-flash”), markdown=True)
agent.print_response(“Share a 2 sentence horror story”)`
The error persists even though my API key is correctly loaded from a .env file. I suspect this might be related to a recent library update or a change in how the Gemini model handles initialization, as the code worked fine in the past with the same setup. I’ve tried:
-
Explicitly passing the API key to the Gemini constructor.
-
Switching to other model IDs like “gemini-1.5-flash”.
-
Verifying my environment and dependencies.
Could this be a bug introduced in a recent version of the agno library? I’m using [insert your agno version, e.g., agno==1.1.4] with Python [insert version :3.13.1]. Any guidance on debugging this or a known workaround would be greatly appreciated. I’d be happy to provide more details or test specific fixes if needed.
Thank you for your time and support!
Best regards,
Narendra