TDK1969 / nonebot_plugin_bilibilibot

基于Nonebot的bilibili通知插件,可将up主,主播以及番剧的更新/直播动态推送到QQ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

指令报错

TTH23 opened this issue · comments

image
image
image
下载zip后把file拖进C:\Users\User\AppData\Local\Programs\Python\Python39\Lib\site-packages\nonebot_plugin_bilibilibot后报错如下
image
萌新 哪里有很傻的地方请指出(捂脸
beta2版本

commented

请问是通过什么方法安装的?
下载zip后的把file拖进……后,请提供完整的日志,看不到具体的报错

使用的nb plugin install nonebot-plugin-bilibilibot指令安装的
image
image
这是导入的图片 txt点进去看了是有文字的
image
C:\Users\28339\AppData\Local\Programs\Python\Python39\Lib\site-packages\nonebot_plugin_bilibilibot\file
这是我放的路径 按照报错里的路径放置的
image
这是载入的插件
image
这是site-packages文件夹

commented

可能是编码的问题?我研究一下

commented

你可以试一下修改__init__.py文件中的sendHelpMsg函数,修改为如下内容:

async def sendHelpMsg(event: MessageEvent):
    userID = event.sender.user_id
    helpMsg = ""
    with open(f'{PackagePath}/file/source/help.txt', 'r', encoding='utf-8') as f:
        helpMsg = f.read()
    await helpCommand.finish(helpMsg)

看看这样还会不会报错

commented

请更新到2.0.3版本,修复了该问题
如果问题仍然存在,请向我反馈