Closed zenorochaV1 closed 1 year ago
same issue
@zenorochaV1 mine resolved by double checking copied __Secure-1PSID. Please check yours
thx @chokychou .. the trailing '.' is part of the cookie id if that helps others
GOT the same Nonetype problem even the value of "BARD_TOKEN" is with the trailing '.'
I found what's wrong.
Function: __get_snlm0e It gives "None" instead of token, and then "None" instead of re.search in library. And "None" instead of re.search dont have group
Pls fix, im too lazy to look into whole code to remake it
__get_snlm0e
could you tell me what is expected to return from __get_snlm0e?
could you tell me what is expected to return from function __get_snlm0eļ¼
---Original--- From: @.> Date: Sat, Apr 8, 2023 01:35 AM To: @.>; Cc: @.**@.>; Subject: Re: [acheong08/Bard] 'NoneType' object has no attribute 'group'(Issue #11)
I found what's wrong.
Function: __get_snlm0e It gives "None" instead of token, and then "None" instead of re.search in library. And "None" instead of re.search dont have group
Pls fix, im too lazy to look into whole code to remake it
ā Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Not the author, but I looked at the code. It appears __get_snlm0e()
returns a string found in a call to https://bard.google.com/
that you can only get if your cookie is valid. If the string is not there, the regex will fail to find it and return None
instead of the string.
This all points to the token not being valid. There are a few different cookies that have the same prefix. Are you sure you have the value of __Secure-1PSID
and not __Secure-1PSIDCC
for your BARD_TOKEN
?
What is causing this issue is you are trying to paste the token in the quotes of the boiler plate code. If you are not using a system variable and want to paste it straight in the code: Delete the os.environ and make the token a string with your token.
āš¾ When I put my session cookie in quotations (copying the info in the readme) in bash, it became functional again, thanks
Although the error was gone after converting to string but it returned nothing for the question; just an empty prompt
'NoneType' object has no attribute 'group'