Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

无法加载内置的schedule插件 #34

Open
a147022899 opened this issue Sep 4, 2020 · 3 comments
Open

无法加载内置的schedule插件 #34

a147022899 opened this issue Sep 4, 2020 · 3 comments

Comments

@a147022899
Copy link

[2020-09-04 18:08:20,221 nonebot] ERROR: Failed to import "aki.plugins.schedule", error: cannot import name 'parse_command' from 'nonebot.command' (/root/anaconda3/lib/python3.8/site-packages/nonebot/command/__init__.py) [2020-09-04 18:08:20,221 nonebot] ERROR: cannot import name 'parse_command' from 'nonebot.command' (/root/anaconda3/lib/python3.8/site-packages/nonebot/command/__init__.py) Traceback (most recent call last): File "/root/anaconda3/lib/python3.8/site-packages/nonebot/plugin.py", line 252, in load_plugin module = importlib.import_module(module_path) File "/root/anaconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/root/Robot-Test/aki/aki/plugins/schedule/__init__.py", line 7, in <module> from nonebot.command import parse_command ImportError: cannot import name 'parse_command' from 'nonebot.command' (/root/anaconda3/lib/python3.8/site-packages/nonebot/command/__init__.py)
每次Aki启动时都是这种样子,代码是git clone的,这使得计划任务功能无法使用。请好心的大佬为我们提供一些修复思路,谢谢。也许是notebot py包的升级,使得该插件里面的函数被替代了。我的python水平不高,并不清楚notebot的api用法。

@tianruiMM
Copy link

command_manager = CommandManager()
cmd, current_arg = command_manager.parse_command(session.bot, cmd_str)

改成👆试试

@stdrc
Copy link
Collaborator

stdrc commented Jan 29, 2021

很好奇这个项目还有人在用吗,已经弃坑好久了😂

@sdy623
Copy link

sdy623 commented Jan 29, 2021

我在使用啊,忽略这个错误就行了

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants