Closed PatchouliMUQ closed 1 year ago
.env.pord
的配置如下
FORTUNE_PATH="./data/fortune"
及以下若干主题
fortune的目录
需要安装插件 nonebot_plugin_apscheduler
在nb中的安装插件中按照 nonebot_plugin_apscheduler 运行并安装成功后 nb run 出现了新的问题
PS C:\Users\76582\Desktop\test\nijika> nb run
使用 Python: C:\Users\76582\Desktop\test\nijika\.venv\Scripts\python.exe
05-09 11:44:52 [SUCCESS] nonebot | NoneBot is initializing...
05-09 11:44:52 [INFO] nonebot | Current Env: prod
05-09 11:44:53 [SUCCESS] nonebot | Succeeded to load plugin "echo" from "nonebot.plugins.echo"
05-09 11:44:55 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_fortune"
05-09 11:44:55 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_apscheduler"
05-09 11:44:56 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_analysis_bilibili"
05-09 11:44:56 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_biliav"
05-09 11:44:58 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_gocqhttp"
05-09 11:44:58 [SUCCESS] nonebot | Running NoneBot...
05-09 11:44:58 [INFO] uvicorn | Started server process [21884]
05-09 11:44:58 [INFO] uvicorn | Waiting for application startup.
05-09 11:44:58 [INFO] nonebot_plugin_apscheduler | Scheduler Started
05-09 11:44:58 [ERROR] uvicorn | Traceback (most recent call last):
File "C:\Users\76582\Desktop\test\nijika\.venv\lib\site-packages\starlette\routing.py", line 677, in lifespan
async with self.lifespan_context(app) as maybe_state:
File "C:\Users\76582\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 199, in __aenter__
return await anext(self.gen)
File "C:\Users\76582\Desktop\test\nijika\.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 165, in _lifespan_manager
await self._lifespan.startup()
File "C:\Users\76582\Desktop\test\nijika\.venv\lib\site-packages\nonebot\drivers\_lifespan.py", line 35, in startup
await self._run_lifespan_func(self._startup_funcs)
File "C:\Users\76582\Desktop\test\nijika\.venv\lib\site-packages\nonebot\drivers\_lifespan.py", line 29, in _run_lifespan_func
await cast(ASYNC_LIFESPAN_FUNC, func)()
File "C:\Users\76582\Desktop\test\nijika\.venv\lib\site-packages\nonebot_plugin_fortune\config.py", line 116, in fortune_check
raise ResourceError("Resource Mamelon.otf is missing! Please check!")
nonebot_plugin_fortune.download.ResourceError: Resource Mamelon.otf is missing! Please check!
05-09 11:44:58 [ERROR] uvicorn | Application startup failed. Exiting.
好像是什么东西消失了,不好意思我的代码经验比较薄弱还请大佬指正🤣🤣
在nb中的安装插件中按照 nonebot_plugin_apscheduler 运行并安装成功后 nb run 出现了新的问题
PS C:\Users\76582\Desktop\test\nijika> nb run 使用 Python: C:\Users\76582\Desktop\test\nijika.venv\Scripts\python.exe 05-09 11:44:52 [SUCCESS] nonebot | NoneBot is initializing... 05-09 11:44:52 [INFO] nonebot | Current Env: prod 05-09 11:44:53 [SUCCESS] nonebot | Succeeded to load plugin "echo" from "nonebot.plugins.echo" 05-09 11:44:55 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_fortune" 05-09 11:44:55 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_apscheduler" 05-09 11:44:56 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_analysis_bilibili" 05-09 11:44:56 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_biliav" 05-09 11:44:58 [SUCCESS] nonebot | Succeeded to load plugin "nonebot_plugin_gocqhttp" 05-09 11:44:58 [SUCCESS] nonebot | Running NoneBot... 05-09 11:44:58 [INFO] uvicorn | Started server process [21884] 05-09 11:44:58 [INFO] uvicorn | Waiting for application startup. 05-09 11:44:58 [INFO] nonebot_plugin_apscheduler | Scheduler Started 05-09 11:44:58 [ERROR] uvicorn | Traceback (most recent call last): File "C:\Users\76582\Desktop\test\nijika.venv\lib\site-packages\starlette\routing.py", line 677, in lifespan async with self.lifespan_context(app) as maybe_state: File "C:\Users\76582\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 199, in aenter return await anext(self.gen) File "C:\Users\76582\Desktop\test\nijika.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 165, in _lifespan_manager await self._lifespan.startup() File "C:\Users\76582\Desktop\test\nijika.venv\lib\site-packages\nonebot\drivers_lifespan.py", line 35, in startup await self._run_lifespan_func(self._startup_funcs) File "C:\Users\76582\Desktop\test\nijika.venv\lib\site-packages\nonebot\drivers_lifespan.py", line 29, in _run_lifespan_func await cast(ASYNC_LIFESPAN_FUNC, func)() File "C:\Users\76582\Desktop\test\nijika.venv\lib\site-packages\nonebot_plugin_fortune\config.py", line 116, in fortune_check raise ResourceError("Resource Mamelon.otf is missing! Please check!") nonebot_plugin_fortune.download.ResourceError: Resource Mamelon.otf is missing! Please check!
05-09 11:44:58 [ERROR] uvicorn | Application startup failed. Exiting. 好像是什么东西消失了,不好意思我的代码经验比较薄弱还请大佬指正🤣🤣
劳烦大佬了!我解决了!原来是我把插件的文件夹下载下来后放错文件夹了,我放在了account下面的data里面,我试着放在上一个文件夹的data下,运行成功了,谢谢大佬
看了一遍觉得应该时这个语句
Cannot load plugin "nonebot_plugin_apscheduler"!
的问题 包括前面的这条标红语句Failed to import "nonebot_plugin_apscheduler"