Closed leimeng86 closed 7 months ago
upgrade package to the dev version, it's been fixed #125
Response Error: b')]}\\'\\n\\n38\\n[[\"wrb.fr\",null,null,null,null,[8]]]\\n54\\n[[\"di\",59],
[\"af.httprm\",59,\"4239016509367430469\",0]]\\n25\\n[[\"e\",4,null,null,129]]\\n'.
Temporarily unavailable due to traffic or an error in cookie values. Please double-check the cookie values and verify your network environment.
The error you're experiencing isn't originating from the package itself; it's related to your Google account and may be due to various factors like your country or region settings, which can prevent you from receiving accurate results from Bard. Therefore, it's beyond the scope of the package to resolve, but please consider checking the following:
Please let me know if you need further assistance.
Use dev version until update pypi version.
$ pip install git+https://github.com/dsdanielpark/Bard-API.git
pip install -U git+https://github.com/dsdanielpark/Bard-API.git
There could be various reasons for the recurring issue.
It is not a Bard-API package code error, I have conducted regular QA and CI for functionality.
This error is due to abnormal responses from Google's internal interfaces, such as regional/account/rate limiting policies. Therefore, it cannot be resolved within this package, and you may need to check the root cause in different environments.
You can try logging out or renewing cookies, bypassing other servers, or checking on platforms like Colab.
pip install -U git+https://github.com/dsdanielpark/Bard-API.git
Please share your user experience related to this error in issue #128. Thank you.
Hello, It seems I have the same issue but in a different environment. I have a simple code that works perfectly on my local machine but generates an error when deployed on Streamlit. I am using the bardapi from GitHub - dsdanielpark/Bard-API: The unofficial python package that returns response of Google Bard through cookie value. and using the latest version. in requirements.txt I have bardapi==0.1.29
import streamlit as st
from dotenv.main import load_dotenv
import os
load_dotenv()
st.title("BardAPI for Python")
_BARD_API_KEY=os.environ['_BARD_API_KEY']
#import os
from bardapi import Bard
with st.container () :
with st.spinner ( 'Wait till Bard gets the answers...' ) :
input_text = "What is the largest state in the USA?"
try :
bard = Bard ( token = _BARD_API_KEY, timeout = 20 )
response = (bard.get_answer ( input_text ) [ 'content' ])
st.write ( response )
except :
st.error ( 'Please check if you have set the Cookie ' )
on the local machine, I get:
BardAPI for Python
The largest state in the USA is Alaska. It has a total area of 586,412 square miles, which is more than two and a half times the size of Texas, the second largest state. Alaska is also the least densely populated state in the USA, with a population of only about 733,000 people.
Here is a list of the 10 largest states in the USA, ranked by total area:
Alaska (586,412 square miles) Texas (268,596 square miles) California (163,695 square miles) Montana (147,046 square miles) New Mexico (121,590 square miles) Arizona (113,990 square miles) Nevada (110,572 square miles) Colorado (104,094 square miles) Oregon (98,379 square miles) Wyoming (97,813 square miles) I hope this helps! Let me know if you have any other questions.
on Streamlit Hub I get:
BardAPI for Python
Response Error: b’)]}‘\n\n38\n[[“wrb.fr”,null,null,null,null,[9]]]\n56\n[[“di”,163],[“af.httprm”,163,“7269046257447756350”,0]]\n25\n[[“e”,4,null,null,131]]\n’. Unable to get response. Please double-check the cookie values and verify your network environment or google account.
I am using the same cookie; nothing changed. Any help is appreciated. Thank you
Hello, It seems I have the same issue but in a different environment. I have a simple code that works perfectly on my local machine but generates an error when deployed on Streamlit. I am using the bardapi from GitHub - dsdanielpark/Bard-API: The unofficial python package that returns response of Google Bard through cookie value. and using the latest version. in requirements.txt I have bardapi==0.1.29
import streamlit as st from dotenv.main import load_dotenv import os load_dotenv() st.title("BardAPI for Python") _BARD_API_KEY=os.environ['_BARD_API_KEY'] #import os from bardapi import Bard with st.container () : with st.spinner ( 'Wait till Bard gets the answers...' ) : input_text = "What is the largest state in the USA?" try : bard = Bard ( token = _BARD_API_KEY, timeout = 20 ) response = (bard.get_answer ( input_text ) [ 'content' ]) st.write ( response ) except : st.error ( 'Please check if you have set the Cookie ' )
on the local machine, I get:
BardAPI for Python
The largest state in the USA is Alaska. It has a total area of 586,412 square miles, which is more than two and a half times the size of Texas, the second largest state. Alaska is also the least densely populated state in the USA, with a population of only about 733,000 people. Here is a list of the 10 largest states in the USA, ranked by total area: Alaska (586,412 square miles) Texas (268,596 square miles) California (163,695 square miles) Montana (147,046 square miles) New Mexico (121,590 square miles) Arizona (113,990 square miles) Nevada (110,572 square miles) Colorado (104,094 square miles) Oregon (98,379 square miles) Wyoming (97,813 square miles) I hope this helps! Let me know if you have any other questions.
on Streamlit Hub I get:
BardAPI for Python Response Error: b’)]}‘\n\n38\n[[“wrb.fr”,null,null,null,null,[9]]]\n56\n[[“di”,163],[“af.httprm”,163,“7269046257447756350”,0]]\n25\n[[“e”,4,null,null,131]]\n’. Unable to get response. Please double-check the cookie values and verify your network environment or google account.
I am using the same cookie; nothing changed. Any help is appreciated. Thank you
hi, have you managed to resolve the problem?
No , I could not find a solution. Even after following the suggestions: logging out, clearing all cookies, logging in again, using the new value. It does not work.
No , I could not find a solution. Even after following the suggestions: logging out, clearing all cookies, logging in again, using the new value. It does not work.
This issue is also related to Google, where for reasons like region, account lock, public IP blocking, or response limits, responses are not being received.
The role of the Bard API package is to send requests and receive responses, which was worked perfectly in this issue.
Therefore, there's nothing we can do to resolve it. If this is not a temporary issue, it would be difficult to use.
I keep getting the same error even by changing account IP etc. Does it help to join the makersuite ?
Reopen the chrome solves the problem.
I have the same problem, when I want to extract the code and convert it to a link py replite , it tells me:
{'content': 'Response Error: b\')]}\\\'\\n\\n39\\n[["wrb.fr",null,null,null,null,[13]]]\\n54\\n[["di",82],["af.httprm",82,"6645275065783071985",2]]\\n25\\n[["e",4,null,null,130]]\\n\'. \nUnable to get response.\nPlease double-check the cookie values and verify your network environment or google account.'}
python version : 3.9
BardApi lib version : 0.1.38
bard_answer it's works , but dealing with images and code does not work
[NOTICE] Please, go to Gemini-API https://github.com/dsdanielpark/Gemini-API
A unofficial Python wrapper, python-gemini-api, operates through reverse-engineering, utilizing cookie values to interact with Google Gemini for users struggling with frequent authentication problems or unable to authenticate via Google Authentication.
Collaborated competently with Antonio Cheong.
[Paper] [Official Website] [Official API] [API Documents]
Gemini is a family of generative AI models developed by Google DeepMind that is designed for multimodal use cases. The Gemini API gives you access to the Gemini Pro and Gemini Pro Vision models. In February 2024, Google's Bard service was changed to Gemini.
pip install python-gemini-api
pip install git+https://github.com/dsdanielpark/Gemini-API.git
For the updated version, use as follows:
pip install -q -U python-gemini-api
Hi, there:
I encountered the response error using
bardapi
toask_about_image
:"Response Error: b')]}\\'\\n\\n38\\n[[\"wrb.fr\",null,null,null,null,[8]]]\\n54\\n[[\"di\",59],[\"af.httprm\",59,\"4239016509367430469\",0]]\\n25\\n[[\"e\",4,null,null,129]]\\n'. \nTemporarily unavailable due to traffic or an error in cookie values. Please double-check the cookie values and verify your network environment."
Then I tried again the Bard UI, and got this warning message.
Is anyone seeing this warning message? And what can we do about it?