跳至主要內容

go-cqhttp

大约 1 分钟

go-cqhttp

go-cqhttp 帮助中心open in new window

Mrs4s/go-cqhttp: cqhttp的golang实现,轻量、原生跨平台. (github.com)open in new window


安装运行(以 Ubuntu 为例)

Releases · Mrs4s/go-cqhttp (github.com)open in new window 获取系统对应版本的 release

解压:

tar -xf go-cqhttp_linux_amd64.tar.gz 

go-cqhttp 文件的所有者以执行权限

chmod u+x go-cqhttp

首次运行 go-cqhttp 生成配置文件

./go-cqhttp

image-20220523134826512

修改完配置后再次运行即可


群内 QA

正在登陆的设备存在风险

Bug: 登录协议崩了 · Issue #1469 · Mrs4s/go-cqhttp (github.com)open in new window

image-20220519201708016

解决方案:

在本地运行 go-cqhttp, 登陆成功会生成 session.token 文件, 将其拷贝到服务器相应位置即可

image-20220523142442098


yobot

群内 QA


Hoshino

群内QA

jinja2 报错

ImportError: cannot import name ‘escape’ from ‘jinja2’

History for requirements.txt - Ice-Cirno/HoshinoBot (github.com)open in new window

指定Jinja2与werkzeug的版本(上游依赖有不兼容的改动) · Ice-Cirno/HoshinoBot@6638354 (github.com)open in new window

image-20220519174112490

这是因为原版 requirements.txtjinja2 用的 >= 默认安装最新版本, 但是 hoshino 无法适应新版本

在依赖中尽量不要写依赖的 latest 版本, 否则新安装依赖默认安装最新版本容易报错

解决方案:

Hoshino 仓库已经更新了 requirements.txt, 直接拉最新的 HoshinoBot/requirements.txt at master · Ice-Cirno/HoshinoBot (github.com)open in new window 安装即可

image-20220519201140632

image-20220519201815162

与 jinja2 同期的上游依赖不兼容的问题还有 werkzeug, 直接拉 hoshino 仓库最新的 requirements 更新即可


RROR: No matching distribution found for dataclasses==0.8 - Streamlit Cloud - Streamlitopen in new window