Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nonebot_plugin_apscheduler错误,无法加载插件 #402

Closed
Akisama514 opened this issue Mar 4, 2023 · 2 comments
Closed

nonebot_plugin_apscheduler错误,无法加载插件 #402

Akisama514 opened this issue Mar 4, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Akisama514
Copy link

Akisama514 commented Mar 4, 2023

运行出现Failed to import "nonebot_plugin_apscheduler"错误和 nonebot | Failed to import "ELF_RSS2",无法加载插件,apscheduler插件也试过nb install 和pip下载都不行。因为报错也提到可能区时问题,修改过apscheduler区时为北京区时,考虑服务器在海外也是试过服务器区时依旧出现一样的错误。使用脚手架和没使用都试过,更换python版本也是会出现一样的错误。

列出安装的 Python 包

anyio==3.6.2
arrow==1.2.3
binaryornot==0.4.4
cashews==5.3.1
certifi @ file:///croot/certifi_1671487769961/work/certifi
chardet==5.1.0
charset-normalizer==3.0.1
click==8.1.3
cookiecutter==2.1.1
distlib==0.3.6
filelock==3.9.0
h11==0.14.0
httpcore==0.16.3
httpx==0.23.3
idna==3.4
importlib-metadata==6.0.0
Jinja2==3.1.2
jinja2-time==0.2.0
MarkupSafe==2.1.2
nb-cli==1.0.5
noneprompt==0.1.9
platformdirs==2.6.2
prompt-toolkit==3.0.38
pydantic==1.10.5
pyfiglet==0.8.post1
python-dateutil==2.8.2
python-slugify==8.0.1
PyYAML==6.0
requests==2.28.2
rfc3986==1.5.0
six==1.16.0
sniffio==1.3.0
text-unidecode==1.3
tomlkit==0.11.6
typing_extensions==4.5.0
urllib3==1.26.14
virtualenv==20.17.1
watchfiles==0.18.1
wcwidth==0.2.6
zipp==3.15.0

如何复现

稳定出现该情况。
我是Ubuntu22.04通过conda来安装的python,创建的是python3.8环境,进入使用pip指令有时会出现与root权限冲突,然后通过python3 -m venv tutorial-env的方式进行依赖或脚手架下载,脚手架是通过nb plugin install来下载插件,然后复制仓库的.env.dev来修改本地的.env.prod(文件就改了管理员QQ、地址和端口),因为仓库没.env文件所以第6部跳过了,运行之后就会出现该错误。

期望行为

No response

实际行为

1
2
3
4
错误日志.txt

@Akisama514 Akisama514 added the bug Something isn't working label Mar 4, 2023
@Akisama514 Akisama514 reopened this Mar 4, 2023
@Akisama514 Akisama514 reopened this Mar 4, 2023
@NekoAria
Copy link
Collaborator

NekoAria commented Mar 5, 2023

试试用 sudo dpkg-reconfigure tzdata 修改系统时区为上海?默认的就是上海时区。
或者往 .env.prod 文件里加 APSCHEDULER_CONFIG={"apscheduler.timezone": "Asia/Shanghai"} ,这里的 "Asia/Shanghai" 改为你系统的时区。

@Akisama514
Copy link
Author

可以了,谢谢大佬,之前改区时是直接去到插件设置文件里面改的没成功....

@NekoAria NekoAria pinned this issue Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants