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

启动插件报错了 #5

Closed
ErosAmor opened this issue May 5, 2022 · 20 comments
Closed

启动插件报错了 #5

ErosAmor opened this issue May 5, 2022 · 20 comments

Comments

@ErosAmor
Copy link

ErosAmor commented May 5, 2022

最初版本没事 卸了老版本的插件安新的报错啥情况
NameError: name 'get_cookies' is not defined

@ErosAmor
Copy link
Author

ErosAmor commented May 5, 2022

RuntimeError: Cannot load plugin "nonebot_plugin_apscheduler"!
05-05 10:19:51 [INFO] uvicorn | Started server process [287402]
05-05 10:19:51 [INFO] uvicorn | Waiting for application startup.
05-05 10:19:51 [ERROR] uvicorn | Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/starlette/routing.py", line 621, in lifespan
async with self.lifespan_context(app):
File "/usr/local/lib/python3.9/dist-packages/starlette/routing.py", line 518, in aenter
await self._router.startup()
File "/usr/local/lib/python3.9/dist-packages/starlette/routing.py", line 598, in startup
await handler()
File "/usr/local/lib/python3.9/dist-packages/splatoon2_tools/init.py", line 27, in start
get_cookies()
NameError: name 'get_cookies' is not defined

@DrinkOolongTea
Copy link
Owner

试一试在bot.py的nonebot.init()
改为nonebot.init(apscheduler_autostart=True)

@DrinkOolongTea
Copy link
Owner

您这边是怎么安装的插件 我这边自己使用插件方式安装 是没问题的

@DrinkOolongTea
Copy link
Owner

如果还不行的话 pip install nonebot_plugin_apscheduler 装下这个 这个是nonebot的定时任务插件

@ErosAmor
Copy link
Author

ErosAmor commented May 5, 2022

还是不行 我就是直接按照read me里面的安装方式安装 把您的插件卸载了后就可以正常运行了

@DrinkOolongTea
Copy link
Owner

装了nonebot_plugin_apscheduler这个插件也不行吗 我自己这边把这个卸载了会出现你这个报错 但是装上之后就不会了

@ErosAmor
Copy link
Author

ErosAmor commented May 5, 2022

对的 装了之后依旧是同样的报错

@ErosAmor
Copy link
Author

ErosAmor commented May 5, 2022

还发现了貌似时区冲突?
raise utils.ZoneInfoNotFoundError(message)
tzlocal.utils.ZoneInfoNotFoundError: 'Multiple conflicting time zone configurations found:\n/etc/timezone: America/New_York\n/etc/localtime is a symlink to: Asia/Shanghai\nFix the configuration, or set the time zone in a TZ environment variable.\n'
05-05 14:30:54 [ERROR] nonebot | Failed to import "splatoon2_tools"

@DrinkOolongTea
Copy link
Owner

您实在什么环境下运行的 docker吗

@ErosAmor
Copy link
Author

ErosAmor commented May 5, 2022

debian11

@DrinkOolongTea
Copy link
Owner

这边方便在您运行脚本的环境 把pip list 和 cat /etc/timezone的结果发我一下吗

@ErosAmor
Copy link
Author

ErosAmor commented May 5, 2022

Package Version


anyio 3.5.0
APScheduler 3.9.1
arrow 1.2.2
asgiref 3.5.0
binaryornot 0.4.4
certifi 2020.6.20
chardet 4.0.0
charset-normalizer 2.0.12
chevron 0.14.0
click 8.1.2
colorama 0.4.4
cookiecutter 1.7.3
fastapi 0.73.0
h11 0.12.0
h2 4.1.0
hpack 4.0.0
httpcore 0.14.7
httplib2 0.18.1
httptools 0.4.0
httpx 0.22.0
hyperframe 6.0.1
idna 2.10
Jinja2 3.1.1
jinja2-time 0.2.0
loguru 0.6.0
lxml 4.8.0
MarkupSafe 2.1.1
multidict 6.0.2
nb-cli 0.6.6
nonebot-adapter-onebot 2.0.0b1
nonebot-plugin-apscheduler 0.1.2
nonebot-plugin-gocqhttp 0.5.2
nonebot-plugin-guild-patch 0.1.3
nonebot2 2.0.0b2
Pillow 9.1.0
pip 20.3.4
poyo 0.5.0
prompt-toolkit 3.0.29
psutil 5.9.0
py-cpuinfo 8.0.0
pycurl 7.43.0.6
pydantic 1.9.0
pyfiglet 0.8.post1
pygtrie 2.4.2
PySimpleSOAP 1.16.2
python-apt 2.2.1
python-dateutil 2.8.2
python-debian 0.1.39
python-debianbts 3.1.0
python-dotenv 0.20.0
python-slugify 6.1.1
pytz 2022.1
pytz-deprecation-shim 0.1.0.post0
PyYAML 6.0
reportbug 7.10.3+deb11u1
requests 2.25.1
rfc3986 1.5.0
setuptools 52.0.0
six 1.16.0
sniffio 1.2.0
starlette 0.17.1
text-unidecode 1.3
tomlkit 0.9.2
typing-extensions 4.2.0
tzdata 2022.1
tzlocal 4.2
urllib3 1.26.5
uvicorn 0.17.6
uvloop 0.16.0
watchgod 0.8.2
wcwidth 0.2.5
websockets 10.3
wheel 0.34.2
yarl 1.7.2

America/New_York

@DrinkOolongTea
Copy link
Owner

这边看到您主机时区是纽约的 是否可以尝试换成 Asia/Shanghai 之后再尝试一下

@ErosAmor
Copy link
Author

ErosAmor commented May 5, 2022

改过了 依旧不行

@DrinkOolongTea
Copy link
Owner

可以看看时区是否生效了,看看有没有报之前时区的错。
如果生效了,我看你这边插件装的好像也没问题,我这边暂时没复现出来你这个报错,是否可以提供个远程窗口检查一下

@DrinkOolongTea
Copy link
Owner

如果不方便的话 建议还是继续使用1.1.1版本 这边如果之后定位出问题 会回复

@DrinkOolongTea
Copy link
Owner

sh.elysion@foxmail.com 这个是我的联系邮箱

@ErosAmor
Copy link
Author

ErosAmor commented May 5, 2022

已发邮箱

@ErosAmor ErosAmor closed this as completed May 5, 2022
@DrinkOolongTea
Copy link
Owner

已经改好了,麻烦看一下邮箱

@ErosAmor
Copy link
Author

ErosAmor commented May 5, 2022 via email

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

No branches or pull requests

2 participants