Zero6992/chatGPT-discord-bot

cannot switch to bard

pqr29 opened this issue · 0 comments

2023-09-23 16:17:19 ERROR src.log -> Error while switching to the Bard model: This event loop is already running
Traceback (most recent call last):
File "C:\Users\usuario\Downloads\test\chatGPT-discord-bot\src\bot.py", line 119, in chat_model
client.chatbot = client.get_chatbot_model()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\usuario\Downloads\test\chatGPT-discord-bot\src\aclient.py", line 80, in get_chatbot_model
return BardChatbot(secure_1psid=self.bard_secure_1psid, secure_1psidts=self.bard_secure_1psidts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\usuario\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\Bard.py", line 64, in init
self.async_chatbot = self.loop.run_until_complete(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 629, in run_until_complete
self._check_running()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 588, in _check_running
raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running
C:\Users\usuario\Downloads\test\chatGPT-discord-bot\src\bot.py:128: RuntimeWarning: coroutine 'AsyncChatbot.create' was never awaited
logger.exception(f"Error while switching to the {choices.value} model: {e}")
RuntimeWarning: Enable tracemalloc to get the object allocation traceback