Giter Club home page Giter Club logo

Comments (3)

dsdanielpark avatar dsdanielpark commented on June 2, 2024 1

Google Bard doesn't seem to have changed its interface; it appears to be an issue that has been present since its inception. The responses could be due to a temporary ban, rate limiting, or failure to receive well-structured answers to repeated identical questions.

However, this was temporary, and it was observed that normal functionality resumed after some time.
These issues could manifest as index errors or encoding errors.

Possible error messages

  • Numerous users reported the issue as a temporary glitch resolved by resetting cookies, restarting the browser, logging in, or waiting it out. (Mostly resolved over time).
Traceback (most recent call last):
  File "/opt/venv/lib/python3.10/site-packages/discord/app_commands/commands.py", line 827, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "/app/main.py", line 669, in askbard
    bard_answer = await bard.get_answer(question)
  File "/opt/venv/lib/python3.10/site-packages/bardapi/core_async.py", line 225, in get_answer
    resp_dict = json.loads(resp.content.splitlines()[3])[0][2]
IndexError: list index out of range

or

Traceback (most recent call last):
  File "C:\Users\Admin\Documents\Scripts\main.py", line 302, in <module>
    main()
  File "C:\Users\Admin\Documents\Scripts\main.py", line 257, in main
    bard_report_name = bard_report(reference)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\Documents\Scripts\main.py", line 70, in bard_report
    final_response = bard.get_answer(prompt)['content']
                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\bardapi\core.py", line 332, in get_answer
    resp_dict = json.loads(resp.content.splitlines()[-5])[0][2]
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

from bard-api.

khoi1908vn avatar khoi1908vn commented on June 2, 2024 1

Thanks for your help. I tried with new cookies and it worked.

from bard-api.

khoi1908vn avatar khoi1908vn commented on June 2, 2024
Traceback (most recent call last):
  File "/opt/venv/lib/python3.10/site-packages/discord/app_commands/commands.py", line 827, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "/app/main.py", line 669, in askbard
    bard_answer = await bard.get_answer(question)
  File "/opt/venv/lib/python3.10/site-packages/bardapi/core_async.py", line 225, in get_answer
    resp_dict = json.loads(resp.content.splitlines()[3])[0][2]
IndexError: list index out of range

I got a similar exception to this one; I think Google changed how Bard behaves.

from bard-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.