yzyyz1387 / cqsat

业余无线电助手,基于Nonebot2
GNU Affero General Public License v3.0
32 stars 0 forks source link

No module named 'nonebot.adapters.onebot.exception' #2

Closed coni233 closed 1 year ago

coni233 commented 1 year ago

你好,我运行的时候报这个错No module named 'nonebot.adapters.onebot.exception,经查,在nonebot.adapters.onebot文件夹下没有exception,是不是nonebot版本的问题,我是nb-cli安装的nonebot,是nb的rc1版本,这个插件也是nb安装的

yzyyz1387 commented 1 year ago

没适配rc1,也就是没适配nb的最新版本(没时间)

coni233 commented 1 year ago

哦哦好吧,明白啦,大佬幸苦了

yzyyz1387 commented 1 year ago

可以自己改一下,你这条issue的改法是:搜索所有的

nonebot.adapters.onebot.exception

改为

nonebot.adapters.onebot.v11.exception

(我记忆中是这样) 还有其他错误的话请再回复一下。近期我有空更新一下

yzyyz1387 commented 1 year ago

如果你有开发环境的话可以改一下,除了上面说的应该是还有一个地方有bug的,在我别的插件也有人提,主要我在复习考研,最近没动代码

coni233 commented 1 year ago

[ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler"这是个什么依赖嘛 ModuleNotFoundError: No module named 'nonebot_plugin_apscheduler'

[ERROR] nonebot | Failed to import "cqsat" RuntimeError: Cannot load plugin "nonebot_plugin_apscheduler"! 考研加油喔

yzyyz1387 commented 1 year ago

是一个依赖插件,定时任务插件,你在商店找一下,按理来说安装这个插件的时候会安装这个的啊

yzyyz1387 commented 1 year ago

加油加油

coni233 commented 1 year ago

nb plugin install nonebot-plugin-apscheduler安了这个启动不会报错了,不过运行的时候考题部分都没问题,卫星部分,绑定位置可以,其他关于卫星的就会FileNotFoundError: [Errno 2] No such file or directory: 'cqsat\\ham_sat.txt 定位:File "F:\Python\Python38\lib\site-packages\cqsat\utils.py", line 80, in read_all with open(path, 'r', encoding='utf-8') as f:

yzyyz1387 commented 1 year ago

该文件是通过访问 https://amsat.org/tle/current/nasabare.txt 来获取轨道数据,你这边的环境是否能打开这个链接(一般都是可以的)

coni233 commented 1 year ago

应该是我昨天网络问题,现在能正常使用了

coni233 commented 1 year ago

[ERROR] apscheduler | Job "aps (trigger: cron[minute='0/1'], next run at: 2022-11-04 18:10:00 CST)" raised an exception File "F:\Python\Python38\lib\site-packages\cqsat\sat\calculate_sat.py", line 94, in calculate sat = ephem.readtle(name, tle[name][0], tle[name][1]) ValueError: incorrect TLE checksum at end of line 定时插件的问题嘛

yzyyz1387 commented 1 year ago

不是,是根据轨道报计算的问题,也就是ephem库,在定时执行计算式出了这个问题 ,但是我没出现过这个问题..

yzyyz1387 commented 1 year ago

代码本身没问题。传进去的tle数据有问题,那也许还是下载数据的问题 定位到

cqsat / ham_sat.txt
cqsat / tiangong.json

这两位个文件,看下是不是空文件,删了这两个文件再订阅试试 image