yuudi / yobot

aide bot for pcr (mobile game) 公主连接群聊机器人
https://yobot.win
GNU General Public License v3.0
573 stars 270 forks source link

[BUG] python3.9运行报错 #193

Closed Cathgao closed 3 years ago

Cathgao commented 3 years ago

机器重装后从官网下载了py3.9安装,挂在到hoshinobot上运行,报module 'base64' has no attribute 'decodestring' Google了一下貌似是PY3.9的问题,请问是否可以适配?

[2020-11-14 20:31:05,896 nonebot] ERROR: Failed to import "hoshino.modules.yobot.yobot", error: module 'base64' has no attribute 'decodestring'
[2020-11-14 20:31:05,898 nonebot] ERROR: module 'base64' has no attribute 'decodestring'
Traceback (most recent call last):
  File "C:\Users\***\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin.py", line 249, in load_plugin
    module = importlib.import_module(module_path)
Lancercmd commented 3 years ago

这表示你的依赖 base64 当前版本没有这个属性,请更换其他版本

yuudi commented 3 years ago

yobot 还没有测试过 python3.9 的适配性,暂时请先使用 3.6 至 3.8 版本。

yuudi commented 3 years ago

这个问题是 yobot 的一个依赖 feedparser 5. 版本未适配 python3.9 导致的,更新到 feedparser 到 6. 即可解决

pip3 install feedparser~=6.0