Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'google.generativeai' has no attribute 'GenerativeModel' #656

Closed
207285 opened this issue Dec 22, 2024 · 2 comments
Closed
Assignees
Labels
component:python sdk Issue/PR related to Python SDK status:awaiting user response Awaiting a response from the author status:stale Issue/PR will be closed automatically if there's no further activity type:bug Something isn't working

Comments

@207285
Copy link

207285 commented Dec 22, 2024

Description of the bug:

When I tried to call the API using the official documents, the following problems appeared:
Traceback (most recent call last):
File "A:****\openai_service.py", line 80, in
model = genai.GenerativeModel("gemini-1.5-flash")
AttributeError: module 'google.generativeai' has no attribute 'GenerativeModel'
1734860549629

Actual vs expected behavior:

No response

Any other information you'd like to share?

No response

@gmKeshari gmKeshari added type:bug Something isn't working status:triaged Issue/PR triaged to the corresponding sub-team component:python sdk Issue/PR related to Python SDK labels Dec 23, 2024
@gmKeshari
Copy link

Hi @207285,

I tried to reproduce the code given in quickstart documentation, It's working fine for me. Here is the gist
I hope you are using upgraded google-generativeai package and pyhton version >= 3.9.

@gmKeshari gmKeshari self-assigned this Dec 23, 2024
@gmKeshari gmKeshari added status:awaiting user response Awaiting a response from the author and removed status:triaged Issue/PR triaged to the corresponding sub-team labels Dec 26, 2024
Copy link

Marking this issue as stale since it has been open for 14 days with no activity. This issue will be closed if no further activity occurs.

@github-actions github-actions bot added the status:stale Issue/PR will be closed automatically if there's no further activity label Jan 10, 2025
@Giom-V Giom-V closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:python sdk Issue/PR related to Python SDK status:awaiting user response Awaiting a response from the author status:stale Issue/PR will be closed automatically if there's no further activity type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants