[Bug]: main.py (250) - [ERROR] : 捕捉到未知异常:set_wakeup_fd only works in main thread of the main interpreter, 请前往 https://github.com/RockChinQ/QChatGPT/issues 查找或提issue^[[0m #437
正在更新依赖库,请等待...
这个操作不是必须的,如果不想更新,请在config.py中添加upgrade_dependencies=False
Looking in indexes: https://pypi.douban.com/simple/
Requirement already satisfied: openai in /usr/local/python3/lib/python3.9/site-packages (0.27.4)
Requirement already satisfied: Pillow in /usr/local/python3/lib/python3.9/site-packages (9.5.0)
Requirement already satisfied: tqdm in /usr/local/python3/lib/python3.9/site-packages (from openai) (4.64.1)
Requirement already satisfied: aiohttp in /usr/local/python3/lib/python3.9/site-packages (from openai) (3.8.4)
Requirement already satisfied: requests>=2.20 in /usr/local/python3/lib/python3.9/site-packages (from openai) (2.28.2)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/python3/lib/python3.9/site-packages (from requests>=2.20->openai) (2022.12.7)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/python3/lib/python3.9/site-packages (from requests>=2.20->openai) (3.4)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/python3/lib/python3.9/site-packages (from requests>=2.20->openai) (2.1.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/python3/lib/python3.9/site-packages (from requests>=2.20->openai) (1.26.15)
Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/python3/lib/python3.9/site-packages (from aiohttp->openai) (1.3.1)
Requirement already satisfied: attrs>=17.3.0 in /usr/local/python3/lib/python3.9/site-packages (from aiohttp->openai) (22.2.0)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/python3/lib/python3.9/site-packages (from aiohttp->openai) (4.0.2)
Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/python3/lib/python3.9/site-packages (from aiohttp->openai) (1.3.3)
Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/python3/lib/python3.9/site-packages (from aiohttp->openai) (6.0.4)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/python3/lib/python3.9/site-packages (from aiohttp->openai) (1.8.2)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 22.0.4; however, version 23.0.1 is available.
You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.
^[[33m[2023-04-25 07:00:37.304] main.py (144) - [WARNING] : [baidu_api_key]不存在^[[0m
^[[33m[2023-04-25 07:00:37.305] main.py (144) - [WARNING] : [baidu_check]不存在^[[0m
^[[33m[2023-04-25 07:00:37.305] main.py (144) - [WARNING] : [baidu_secret_key]不存在^[[0m
^[[33m[2023-04-25 07:00:37.305] main.py (144) - [WARNING] : [blob_message_strategy]不存在^[[0m
^[[33m[2023-04-25 07:00:37.305] main.py (144) - [WARNING] : [blob_message_threshold]不存在^[[0m
^[[33m[2023-04-25 07:00:37.306] main.py (144) - [WARNING] : [font_path]不存在^[[0m
^[[33m[2023-04-25 07:00:37.306] main.py (144) - [WARNING] : [ignore_rules]不存在^[[0m
^[[33m[2023-04-25 07:00:37.306] main.py (144) - [WARNING] : [inappropriate_message_tips]不存在^[[0m
^[[33m[2023-04-25 07:00:37.306] main.py (144) - [WARNING] : [income_msg_check]不存在^[[0m
^[[33m[2023-04-25 07:00:37.307] main.py (144) - [WARNING] : [pool_num]不存在^[[0m
^[[33m[2023-04-25 07:00:37.307] main.py (144) - [WARNING] : [rate_limit_drop_tip]不存在^[[0m
^[[33m[2023-04-25 07:00:37.307] main.py (144) - [WARNING] : [rate_limit_strategy]不存在^[[0m
^[[33m[2023-04-25 07:00:37.307] main.py (144) - [WARNING] : [rate_limitation]不存在^[[0m
^[[33m[2023-04-25 07:00:37.308] main.py (144) - [WARNING] : [upgrade_dependencies]不存在^[[0m
^[[33m[2023-04-25 07:00:37.308] main.py (147) - [WARNING] : 配置文件不完整,请依据config-template.py检查config.py^[[0m
^[[33m[2023-04-25 07:00:37.308] main.py (148) - [WARNING] : 以上配置已被设为默认值,将在5秒后继续启动... ^[[0m
^[[37m[2023-04-25 07:00:43.283] keymgr.py (62) - [INFO] : 使用api-key:default^[[0m
^[[37m[2023-04-25 07:00:43.284] manager.py (30) - [INFO] : 文字总使用量:203084^[[0m
^[[37m[2023-04-25 07:00:43.285] manager.py (95) - [INFO] : 加载禁用列表: person: [2854196310], group: [204785790, 691226829]^[[0m
^[[37m[2023-04-25 07:00:43.286] host.py (88) - [INFO] : 加载插件^[[0m
^[[37m[2023-04-25 07:00:43.288] host.py (105) - [INFO] : 初始化插件^[[0m
^[[31m[2023-04-25 07:00:43.391] main.py (250) - [ERROR] : 捕捉到未知异常:set_wakeup_fd only works in main thread of the main interpreter, 请前往 https://github.com/RockChinQ/QChatGPT/issues 查找或提issue^[[0m
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.9/asyncio/unix_events.py", line 95, in add_signal_handler
signal.set_wakeup_fd(self._csock.fileno())
ValueError: set_wakeup_fd only works in main thread of the main interpreter
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/usr/local/python3/lib/python3.9/threading.py", line 917, in run
self._target(*self._args, self._kwargs)
File "/root/QChatGPT/main.py", line 253, in run_bot_wrapper
raise e
File "/root/QChatGPT/main.py", line 215, in run_bot_wrapper
qqbot.bot.run()
File "/usr/local/python3/lib/python3.9/site-packages/mirai/bot.py", line 199, in run
MiraiRunner(self).run(host, port, asgi_server, kwargs)
File "/usr/local/python3/lib/python3.9/site-packages/mirai/bot.py", line 257, in run
if not asgi_serve(
File "/usr/local/python3/lib/python3.9/site-packages/mirai/asgi.py", line 210, in asgi_serve
asyncio.run(serve(app, config), debug=True)
File "/usr/local/python3/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/python3/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/usr/local/python3/lib/python3.9/site-packages/hypercorn/asyncio/init.py", line 49, in serve
await worker_serve(
File "/usr/local/python3/lib/python3.9/site-packages/hypercorn/asyncio/run.py", line 67, in worker_serve
loop.add_signal_handler(getattr(signal, signal_name), _signal_handler)
File "/usr/local/python3/lib/python3.9/asyncio/unix_events.py", line 97, in add_signal_handler
raise RuntimeError(str(exc))
RuntimeError: set_wakeup_fd only works in main thread of the main interpreter
Database initialized.
部署方式
手动部署
登录框架
Mirai
系统环境
Centos 7
Python环境
Python 3.9.16
异常情况
运行了一个多月了,今天忽然出现了这个错误,看过依赖也没有更新
报错信息
正在更新依赖库,请等待... 这个操作不是必须的,如果不想更新,请在config.py中添加upgrade_dependencies=False Looking in indexes: https://pypi.douban.com/simple/ Requirement already satisfied: openai in /usr/local/python3/lib/python3.9/site-packages (0.27.4) Requirement already satisfied: Pillow in /usr/local/python3/lib/python3.9/site-packages (9.5.0) Requirement already satisfied: tqdm in /usr/local/python3/lib/python3.9/site-packages (from openai) (4.64.1) Requirement already satisfied: aiohttp in /usr/local/python3/lib/python3.9/site-packages (from openai) (3.8.4) Requirement already satisfied: requests>=2.20 in /usr/local/python3/lib/python3.9/site-packages (from openai) (2.28.2) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/python3/lib/python3.9/site-packages (from requests>=2.20->openai) (2022.12.7) Requirement already satisfied: idna<4,>=2.5 in /usr/local/python3/lib/python3.9/site-packages (from requests>=2.20->openai) (3.4) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/python3/lib/python3.9/site-packages (from requests>=2.20->openai) (2.1.1) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/python3/lib/python3.9/site-packages (from requests>=2.20->openai) (1.26.15) Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/python3/lib/python3.9/site-packages (from aiohttp->openai) (1.3.1) Requirement already satisfied: attrs>=17.3.0 in /usr/local/python3/lib/python3.9/site-packages (from aiohttp->openai) (22.2.0) Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/python3/lib/python3.9/site-packages (from aiohttp->openai) (4.0.2) Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/python3/lib/python3.9/site-packages (from aiohttp->openai) (1.3.3) Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/python3/lib/python3.9/site-packages (from aiohttp->openai) (6.0.4) Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/python3/lib/python3.9/site-packages (from aiohttp->openai) (1.8.2) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv WARNING: You are using pip version 22.0.4; however, version 23.0.1 is available. You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command. ^[[33m[2023-04-25 07:00:37.304] main.py (144) - [WARNING] : [baidu_api_key]不存在^[[0m ^[[33m[2023-04-25 07:00:37.305] main.py (144) - [WARNING] : [baidu_check]不存在^[[0m ^[[33m[2023-04-25 07:00:37.305] main.py (144) - [WARNING] : [baidu_secret_key]不存在^[[0m ^[[33m[2023-04-25 07:00:37.305] main.py (144) - [WARNING] : [blob_message_strategy]不存在^[[0m ^[[33m[2023-04-25 07:00:37.305] main.py (144) - [WARNING] : [blob_message_threshold]不存在^[[0m ^[[33m[2023-04-25 07:00:37.306] main.py (144) - [WARNING] : [font_path]不存在^[[0m ^[[33m[2023-04-25 07:00:37.306] main.py (144) - [WARNING] : [ignore_rules]不存在^[[0m ^[[33m[2023-04-25 07:00:37.306] main.py (144) - [WARNING] : [inappropriate_message_tips]不存在^[[0m ^[[33m[2023-04-25 07:00:37.306] main.py (144) - [WARNING] : [income_msg_check]不存在^[[0m ^[[33m[2023-04-25 07:00:37.307] main.py (144) - [WARNING] : [pool_num]不存在^[[0m ^[[33m[2023-04-25 07:00:37.307] main.py (144) - [WARNING] : [rate_limit_drop_tip]不存在^[[0m ^[[33m[2023-04-25 07:00:37.307] main.py (144) - [WARNING] : [rate_limit_strategy]不存在^[[0m ^[[33m[2023-04-25 07:00:37.307] main.py (144) - [WARNING] : [rate_limitation]不存在^[[0m ^[[33m[2023-04-25 07:00:37.308] main.py (144) - [WARNING] : [upgrade_dependencies]不存在^[[0m ^[[33m[2023-04-25 07:00:37.308] main.py (147) - [WARNING] : 配置文件不完整,请依据config-template.py检查config.py^[[0m ^[[33m[2023-04-25 07:00:37.308] main.py (148) - [WARNING] : 以上配置已被设为默认值,将在5秒后继续启动... ^[[0m ^[[37m[2023-04-25 07:00:43.283] keymgr.py (62) - [INFO] : 使用api-key:default^[[0m ^[[37m[2023-04-25 07:00:43.284] manager.py (30) - [INFO] : 文字总使用量:203084^[[0m ^[[37m[2023-04-25 07:00:43.285] manager.py (95) - [INFO] : 加载禁用列表: person: [2854196310], group: [204785790, 691226829]^[[0m ^[[37m[2023-04-25 07:00:43.286] host.py (88) - [INFO] : 加载插件^[[0m ^[[37m[2023-04-25 07:00:43.288] host.py (105) - [INFO] : 初始化插件^[[0m ^[[31m[2023-04-25 07:00:43.391] main.py (250) - [ERROR] : 捕捉到未知异常:set_wakeup_fd only works in main thread of the main interpreter, 请前往 https://github.com/RockChinQ/QChatGPT/issues 查找或提issue^[[0m Exception in thread Thread-2: Traceback (most recent call last): File "/usr/local/python3/lib/python3.9/asyncio/unix_events.py", line 95, in add_signal_handler signal.set_wakeup_fd(self._csock.fileno()) ValueError: set_wakeup_fd only works in main thread of the main interpreter
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/python3/lib/python3.9/threading.py", line 980, in _bootstrap_inner self.run() File "/usr/local/python3/lib/python3.9/threading.py", line 917, in run self._target(*self._args, self._kwargs) File "/root/QChatGPT/main.py", line 253, in run_bot_wrapper raise e File "/root/QChatGPT/main.py", line 215, in run_bot_wrapper qqbot.bot.run() File "/usr/local/python3/lib/python3.9/site-packages/mirai/bot.py", line 199, in run MiraiRunner(self).run(host, port, asgi_server, kwargs) File "/usr/local/python3/lib/python3.9/site-packages/mirai/bot.py", line 257, in run if not asgi_serve( File "/usr/local/python3/lib/python3.9/site-packages/mirai/asgi.py", line 210, in asgi_serve asyncio.run(serve(app, config), debug=True) File "/usr/local/python3/lib/python3.9/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/local/python3/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete return future.result() File "/usr/local/python3/lib/python3.9/site-packages/hypercorn/asyncio/init.py", line 49, in serve await worker_serve( File "/usr/local/python3/lib/python3.9/site-packages/hypercorn/asyncio/run.py", line 67, in worker_serve loop.add_signal_handler(getattr(signal, signal_name), _signal_handler) File "/usr/local/python3/lib/python3.9/asyncio/unix_events.py", line 97, in add_signal_handler raise RuntimeError(str(exc)) RuntimeError: set_wakeup_fd only works in main thread of the main interpreter Database initialized.