ediziks / BingGPT-Discord-Bot

BingGPT Discord Bot that can handle /ask & /imagine prompts using reverse engineered API of Microsoft's Bing Chat under the hood
The Unlicense
119 stars 14 forks source link

Error - TypeError: 'builtin_function_or_method' object is not subscriptable #29

Closed Bonhovis closed 11 months ago

Bonhovis commented 1 year ago

@ediziks I was getting the below error. Windows 10.

PS D:\Downloads\Discord\bots\BingGPT-Discord-Bot-main> python src/bot.py
Traceback (most recent call last):
  File "D:\Downloads\Discord\bots\BingGPT-Discord-Bot-main\src\bot.py", line 44, in <module>
    gptbot = Chatbot(cookie_path='cookies.json')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Downloads\Discord\bots\BingGPT-Discord-Bot-main\src\EdgeGPT.py", line 603, in __init__
    self.chat_hub: _ChatHub = _ChatHub(
                              ^^^^^^^^^
  File "D:\Downloads\Discord\bots\BingGPT-Discord-Bot-main\src\EdgeGPT.py", line 415, in __init__
    conversation_signature=conversation.struct.get["conversationSignature"],
                           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'builtin_function_or_method' object is not subscriptable

Had to change line 415 to the following to get it working:

conversation_signature=conversation.struct.get("conversationSignature")
estrizal commented 11 months ago

same error in ubuntu

ediziks commented 11 months ago

Thanks for notifying about the issue. It is now fixed on main.