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

'Gemini' object has no attribute 'session' #32

Closed
anujpaude1 opened this issue May 12, 2024 · 1 comment
Closed

'Gemini' object has no attribute 'session' #32

anujpaude1 opened this issue May 12, 2024 · 1 comment

Comments

@anujpaude1
Copy link

anujpaude1 commented May 12, 2024

Code :


client = Gemini(cookie_fp="cookies.txt")

response = client.generate_content("Hello, Gemini. What's the weather like in Seoul today?")
response.payload

Error:

AttributeError                            Traceback (most recent call last)
[<ipython-input-6-25dd85f77876>](https://localhost:8080/#) in <cell line: 3>()
      1 from gemini import Gemini
      2 
----> 3 client = Gemini(cookie_fp="cookies.txt")
      4 
      5 response = client.generate_content("Hello, Gemini. What's the weather like in Seoul today?")

2 frames
[/usr/local/lib/python3.10/dist-packages/gemini/client.py](https://localhost:8080/#) in _set_cookies_from_file(self, file_path)
    141             raise Exception(f"Failed to load cookies from {file_path}: {e}")
    142 
--> 143         self.session.cookies.update(cookies)
    144 
    145     def _set_sid_and_nonce(self):

AttributeError: 'Gemini' object has no attribute 'session'
@dsdanielpark
Copy link
Owner

Thank you for reporting the issue.

The issue was resolved in the following commit:
13e7971

Please use version 2.4.12. If the problem persists, feel free to reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants