HibiKier / zhenxun_bot

基于 Nonebot2 开发,非常可爱的绪山真寻bot
GNU Affero General Public License v3.0
3.39k stars 602 forks source link

无法启动 #60

Closed RandomEnch closed 3 years ago

RandomEnch commented 3 years ago

10-04 13:49:33 [ERROR] uvicorn | Traceback (most recent call last): File "c:\users\10484\appdata\local\programs\python\python39\lib\site-packages\starlette\routing.py", line 526, in lifespan async for item in self.lifespan_context(app): File "c:\users\10484\appdata\local\programs\python\python39\lib\site-packages\starlette\routing.py", line 467, in default_lifespan await self.startup() File "c:\users\10484\appdata\local\programs\python\python39\lib\site-packages\starlette\routing.py", line 504, in startup handler() File "plugins\initconfig__init__.py", line 27, in init_plugins_settings(DATA_PATH) File "plugins\init_config\data_source.py", line 53, in init_plugins_settings _module = _plugin.module AttributeError: 'NoneType' object has no attribute 'module'

10-04 13:49:33 [ERROR] uvicorn | Application startup failed. Exiting.

HibiKier commented 3 years ago

nonebot2的版本是?

RandomEnch commented 3 years ago

2.0.0a13.post1

HibiKier commented 3 years ago

前面的插件都有加载上嘛,这个看上去是没加载上插件

RandomEnch commented 3 years ago

前面都加载上了,没有报错

RandomEnch commented 3 years ago

我靠,env里头的superuser忘记填了,填上没问题了

HibiKier commented 3 years ago

。。。

RandomEnch commented 3 years ago

也不对,加上init_config就开不开,不加的话倒是没问题

HibiKier commented 3 years ago

什么开不开,什么报错

RandomEnch commented 3 years ago

机器人启动不了,但是除了最后前面什么报错都没有

RandomEnch commented 3 years ago

10-04 14:53:56 [INFO] nonebot | Running NoneBot... 10-04 14:53:56 [INFO] uvicorn | Started server process [48880] 10-04 14:53:56 [INFO] uvicorn | Waiting for application startup. 10-04 14:53:57 [INFO] services | Database loaded successfully! 10-04 14:53:57 [INFO] nonebot_plugin_apscheduler | Scheduler Started 10-04 14:53:57 [INFO] utils | 正在检查 Chromium 更新 10-04 14:53:58 [INFO] nonebot | 成功获取赛马娘当前up信息...当前up池: & 10-04 14:53:58 [INFO] nonebot | 成功获取明日方舟当前up信息...当前up池: 【瑕光微明】 10-04 14:53:59 [INFO] nonebot | 成功获取原神当前up信息...当前up池: 「浮岳虹珠」 & 「神铸赋形」 10-04 14:53:59 [INFO] nonebot | 成功获取坎公骑冠剑当前up信息...当前up池: 9月30日UP卡池 & 9月30日UP卡池 10-04 14:54:00 [ERROR] uvicorn | Traceback (most recent call last): File "c:\users\10484\appdata\local\programs\python\python39\lib\site-packages\starlette\routing.py", line 526, in lifespan async for item in self.lifespan_context(app): File "c:\users\10484\appdata\local\programs\python\python39\lib\site-packages\starlette\routing.py", line 467, in default_lifespan await self.startup() File "c:\users\10484\appdata\local\programs\python\python39\lib\site-packages\starlette\routing.py", line 504, in startup handler() File "plugins\initconfig__init__.py", line 27, in init_plugins_settings(DATA_PATH) File "plugins\init_config\data_source.py", line 53, in init_plugins_settings _module = _plugin.module AttributeError: 'NoneType' object has no attribute 'module'

10-04 14:54:00 [ERROR] uvicorn | Application startup failed. Exiting. 请按任意键继续. . .

HibiKier commented 3 years ago

plugins\init_config\data_source.py 第52行加一行,看看输出

print(matcher.module)
RandomEnch commented 3 years ago

整好了,谢了

RealKiro commented 3 years ago

我也出现这条报错了(大雾

10-04 17:03:42 [INFO] nonebot | 已成功加载 53 个非限制插件.                     
10-04 17:03:42 [ERROR] uvicorn | Traceback (most recent call last):             
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 526, 
in lifespan                                                                     
    async for item in self.lifespan_context(app):                               
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 467, 
in default_lifespan                                                             
    await self.startup()                                                        
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 504, 
in startup                                                                      
    handler()                                                                   
  File "/zhenxun_bot/plugins/init_config/__init__.py", line 28, in _            
    init_plugins_cd_limit(DATA_PATH)                                            
  File "/zhenxun_bot/plugins/init_config/data_source.py", line 149, in init_plug
ins_cd_limit                                                                    
    _data = yaml.load(f)                                                        
  File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/main.py", line 434, i
n load                                                                          
    return constructor.get_single_data()                                        
  File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line
 120, in get_single_data                                                        
    node = self.composer.get_single_node()                                      
  File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node    
  File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document  
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node      
  File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_no
de                                                                              
  File "_ruamel_yaml.pyx", line 731, in _ruamel_yaml.CParser._compose_node      
  File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event  
ruamel.yaml.scanner.ScannerError: while scanning a simple key                   
  in "/zhenxun_bot/data/configs/plugins2cd.yaml", line 15, column 1             
could not find expected ':'                                                     
  in "/zhenxun_bot/data/configs/plugins2cd.yaml", line 16, column 1             

10-04 17:03:42 [ERROR] uvicorn | Application startup failed. Exiting.  
HibiKier commented 3 years ago

我也出现这条报错了(大雾

10-04 17:03:42 [INFO] nonebot | 已成功加载 53 个非限制插件.                     
10-04 17:03:42 [ERROR] uvicorn | Traceback (most recent call last):             
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 526, 
in lifespan                                                                     
    async for item in self.lifespan_context(app):                               
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 467, 
in default_lifespan                                                             
    await self.startup()                                                        
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 504, 
in startup                                                                      
    handler()                                                                   
  File "/zhenxun_bot/plugins/init_config/__init__.py", line 28, in _            
    init_plugins_cd_limit(DATA_PATH)                                            
  File "/zhenxun_bot/plugins/init_config/data_source.py", line 149, in init_plug
ins_cd_limit                                                                    
    _data = yaml.load(f)                                                        
  File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/main.py", line 434, i
n load                                                                          
    return constructor.get_single_data()                                        
  File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line
 120, in get_single_data                                                        
    node = self.composer.get_single_node()                                      
  File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node    
  File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document  
  File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node      
  File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_no
de                                                                              
  File "_ruamel_yaml.pyx", line 731, in _ruamel_yaml.CParser._compose_node      
  File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event  
ruamel.yaml.scanner.ScannerError: while scanning a simple key                   
  in "/zhenxun_bot/data/configs/plugins2cd.yaml", line 15, column 1             
could not find expected ':'                                                     
  in "/zhenxun_bot/data/configs/plugins2cd.yaml", line 16, column 1             

10-04 17:03:42 [ERROR] uvicorn | Application startup failed. Exiting.  

你修改了plugin2cd.yaml?

RealKiro commented 3 years ago

你修改了plugin2cd.yaml?

没有啊,没动个人之外的参数

HibiKier commented 3 years ago

configs/plugins2cd.yaml把这个文件删除后重启重新生成试试

RealKiro commented 3 years ago

configs/plugins2cd.yaml把这个文件删除后重启重新生成试试

解决了,感谢!