Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Exception: SNlM0e value not found in response. Check __Secure-1PSID value. #247

Closed
M16051997 opened this issue Dec 11, 2023 · 1 comment
Closed

Comments

@M16051997
Copy link

import bardapi
from bardapi import BardCookies

cookie_dict = {
"_Secure_1PSID" : "dwg6d8WgDhQ3HyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxTPWBZevFDnmxGkQMQ",
"_Secure_1PSIDTS" : "sidts-CjEBPVxjSiEbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxUJikHdi0bl1BS1y-kcgqBtEAA",
"_Secure_1PSIDCC" : "ACA-OxOACryanisxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxnGi4vCG2-AzXFwCG07bL3JLBk0"
}

bard = BardCookies(cookie_dict=cookie_dict)

print(bard.get_answer("Explain about peptide compounds and structures")['content'])

Traceback (most recent call last):
File "e:\Object Detection Model\Google_Bard\test.py", line 10, in
bard = BardCookies(cookie_dict=cookie_dict)
File "D:\Python 3.9\lib\site-packages\bardapi\core_cookies.py", line 53, in init
self.SNlM0e = self._get_snim0e()
File "D:\Python 3.9\lib\site-packages\bardapi\core_cookies.py", line 119, in _get_snim0e
raise Exception(
Exception: SNlM0e value not found in response. Check __Secure-1PSID value.

I given correct _Secure_1PSID Value But still iam getting the Same error for many times.

I am not able to find the solution.

@dsdanielpark
Copy link
Owner

Please check FAQ , #99 and #155.

Also, I would appreciate it if you could verify the version of your Bard API.

Furthermore, ensure your account can successfully receive responses from the web UI. Try forcibly refreshing the cookie value, or log out, close all browsers, and then log back in to update the cookie value.

If you carefully review the above details, you should be able to resolve the issue. The package has been verified to be functioning normally.

Since this is a duplicate issue, I am closing it.

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

No branches or pull requests

2 participants