dsdanielpark / Gemini-API

The unofficial python package that returns response of Google Gemini through cookie values.
https://pypi.org/project/python-gemini-api/
MIT License
160 stars 14 forks source link

ModuleNotFoundError: No module named 'gemini.src.module' #25

Closed ayu2606 closed 6 months ago

ayu2606 commented 6 months ago

Describe the bug

ModuleNotFoundError: No module named 'gemini.src.module'

Version OS: windows 11 Python: 3.12.2 Gemini API: 2.4.0 Using proxy: No Legion: (i do not understand this)

Code

from gemini import Gemini

cookies_dict= #redacted
GeminiClient = Gemini(cookies=cookies_dict)

prompt = "Hello, Gemini. What's the weather like in Seoul today?"
response = GeminiClient.generate_content(prompt)
print(response.text)

Error

Traceback (most recent call last):
  File "C:\Users\Ayush\Desktop\Project\jarvis\brain\bard.py", line 1, in <module>
    from gemini import Gemini
  File "C:\Users\Ayush\AppData\Local\Programs\Python\Python312\Lib\site-packages\gemini\__init__.py", line 5, in <module>
    from .src.module.openrouter.client import OpenRouter
ModuleNotFoundError: No module named 'gemini.src.module'
dsdanielpark commented 6 months ago

Thank you sincerely. I plan to carefully work on the test code and the rest this weekend.

This error has been fixed in version 2.4.1 through a hotfix, now.