acheong08 / Bard

Python SDK/API for reverse engineered Google Bard
MIT License
1.42k stars 178 forks source link

IndexError: list index out of range #63

Closed 11100010 closed 1 year ago

11100010 commented 1 year ago

Has anyone encountered this IndexError?

0000s-MacBook-Pro :: ~ » python3 -m Bard

        Bard - A command-line interface to Google's Bard (https://bard.google.com/)
        Repo: github.com/acheong08/Bard

        Enter `alt+enter` or `esc+enter` to send a message.

/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Bard.py:62: DeprecationWarning: There is no current event loop
  self.loop = asyncio.get_event_loop()
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Bard.py", line 304, in <module>
    response = chatbot.ask(MESSAGE)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Bard.py", line 83, in ask
    return self.loop.run_until_complete(self.async_chatbot.ask(message))
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Bard.py", line 260, in ask
    chat_data = json.loads(resp.content.splitlines()[3])[0][2]
IndexError: list index out of range
TheHamkerCat commented 1 year ago

Remove the old __Secure-1PSID and add a new fresh one