Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

API call is failing. Google may have changed the API response structure #59

Open
sudipkumarbhattacharya opened this issue Jun 27, 2023 · 7 comments

Comments

@sudipkumarbhattacharya
Copy link

sudipkumarbhattacharya commented Jun 27, 2023

API call is failing. Google may have changed the API response structure

Traceback (most recent call last):
File "bard-hack.py", line 8, in
response = chatbot.ask("Tell me a joke?")
File "/lib/python3.9/site-packages/Bard.py", line 83, in ask
return self.loop.run_until_complete(self.async_chatbot.ask(message))
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/lib/python3.9/site-packages/Bard.py", line 247, in ask
"content": json_chat_data[0][0],
TypeError: 'NoneType' object is not subscriptable

@raymerjacque
Copy link

yip. i am getting the same...

@Hikoboshi00
Copy link

Have you tried updating? I don't see this issue on the new update.

@anthrpc
Copy link

anthrpc commented Jun 29, 2023

Yep, I'm on the latest version already. I don't know why but it only works for the CLI version, when I run the example.py, it returns the same error.

It was working for a while when I upgraded my version, but after leaving it for a few days (3 days or so) it just randomly returned me that error.

I discovered this when I went on the website I made with this. It kept returning Error Code: 500 Internal Server Error.

So I looked into my JS and Python code but I saw no mistakes so I decided to download the zip file provided, and it still didn't work. (By not working I mean that it's returning that error.)

I was so frustrated that I literally resorted to ChatGPT 😂

@AndrewsPanda
Copy link

It has been down for me as well.

@0m364
Copy link

0m364 commented Jul 2, 2023

since these aren't official apis sometimes you have to regenerate from the cookie .. it should be working (or at least it is for me (01-july-2023 2117 EST)

@the-confused-genius
Copy link

i got the same error, so does it work with the new update?

@0m364
Copy link

0m364 commented Jul 4, 2023

I am not getting these errors .. device galaxy s21 unrooted I will uninstall termux and try from a fresh install as I may have dependencies built into my machine that aren't listed in requirements to run . but when I make an API call it replies back with around 3 second delay

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

7 participants