Zero6992 / chatGPT-discord-bot

Integrate ChatGPT into your own discord bot
GNU General Public License v2.0
2.6k stars 699 forks source link

chat left thinking in discord when uploaded to a cpanel linux server #385

Closed lunaillusion closed 4 months ago

lunaillusion commented 1 year ago

hi there, great bot and thank you for your hard work.

after getting the bot to work locally, i added it to my hosting server to keep the uptime without keeping my PC on.

the /draw function works fine but when i use /chat it doesnt stop thinking and wont respond, has anyone experienced this or

Zero6992 commented 1 year ago

any error message?

lunaillusion commented 1 year ago

any error message?

2023-05-03 14:07:05 INFO src.aclient -> No Channel selected. Skip sending system prompt. 2023-05-03 14:07:05 INFO src.bot -> gptbot#1360 is now running! Task exception was never retrieved future: <Task finished name='Task-12' coro=<aclient.process_messages() done, defined at /home/remoteadmin/Documents/ChatGPTBot/chatGPT-discord-bot-main/src/aclient.py:54> exception=RuntimeError("Task <Task pending name='Task-12' coro=<aclient.process_messages() running at /home/remoteadmin/Documents/ChatGPTBot/chatGPT-discord-bot-main/src/aclient.py:56>> got Future attached to a different loop")> Traceback (most recent call last): File "/home/remoteadmin/Documents/ChatGPTBot/chatGPT-discord-bot-main/src/aclient.py", line 56, in process_messages message, user_message = await self.message_queue.get() File "/usr/lib/python3.9/asyncio/queues.py", line 166, in get await getter RuntimeError: Task <Task pending name='Task-12' coro=<aclient.process_messages() running at /home/remoteadmin/Documents/ChatGPTBot/chatGPT-discord-bot-main/src/aclient.py:56>> got Future attached to a different loop

programerr01 commented 1 year ago

@lunaillusion i have the same issue #375

BenjaminKeating1986 commented 1 year ago

Same here :( works fine on windows

kolunda commented 1 year ago

It looks like your server is running Python 3.9 while the build in the Dockerfile uses Python 3.10. I believe when I set this up the first time in Linux I had to upgrade Python to get it to work properly. Can you try either 1) installing docker and building an image of the bot and running that image or 2) Installing a later version of python3? The first option is more safe (from your system not breaking from Python 3.9 dependencies) compared to option two.