You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
我使用了树莓派并安装ubuntu22.04LTS系统
目标是在树莓派上安装nonebot2和gocqhttp插件来管理qq机器人
无公网,树莓派固定ip地址192.168.0.12
一开始我按照一般流程修改了env.dev里的”HOST=“项,一开始我在此填入了127.0.0.1,但这样我就无法在同局域网内的另一台电脑访问http://192.168.0.12:33114/go-cqhttp/,
于是我将其修改为树莓派固定好的ip地址,这样就可以打开http://192.168.0.12:33114/go-cqhttp/了,
但是当我输入机器人账号并尝试登陆时,控制台显示反向ws服务器连接失败并一直尝试连接,
而后我修改了/home/ubuntu/.local/lib/python3.10/site-packages/nonebot_plugin_gocqhttp/process/下的config.py文件中第48行
"server_address": f"ws://127.0.0.1:{driver_config.port}/onebot/v11/ws",
并将其中的127.0.0.1改为192.168.0.12(即树莓派固定好的ip地址)
"server_address": f"ws://192.168.0.12:{driver_config.port}/onebot/v11/ws",
保存,开启nonebot,不再报错,事情解决
建议:不知道/home/ubuntu/.local/lib/python3.10/site-packages/nonebot_plugin_gocqhttp/process/config.py文件能否像
/home/ubuntu/.local/lib/python3.10/site-packages/nonebot_plugin_gocqhttp/init.py文件中的第61行
f"<u><e>http://{driver.config.host}:{driver.config.port}/go-cqhttp/</e></u>"
一样,改为"server_address": f"ws://{driver.config.host}:{driver_config.port}/onebot/v11/ws",
并在文件头调用相应模块来一劳永逸
The text was updated successfully, but these errors were encountered: