HibiKier / zhenxun_bot

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

导入插件失败 #1229

Closed Yql66 closed 1 year ago

Yql66 commented 1 year ago

系统版本:Ubuntu 20.04

真寻版本:0.1.5.3

日志截图

![Q8S OZJ3}P15OI### 系统版本:Ubuntu 20.04

真寻版本:0.1.5.3

日志截图

[img] G9`}ER](https://user-images.githubusercontent.com/111969738/211191116-a5f47bc1-4962-41b1-aa69-58312fa1763e.png)

错误说明

发生了xx错误...

Yql66 commented 1 year ago

01-08 18:21:07 [ERROR] nonebot | Failed to import "zhenxun_plugin_DouyinShare" Traceback (most recent call last): File "C:\Users\Administrator\Desktop\zhenxun\zhenxun_bot\bot.py", line 15, in nonebot.load_plugins("extensive_plugin") File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\load.py", line 39 , in load_plugins return manager.load_all_plugins() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\manager.py", line 172, in load_all_plugins return set( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\manager.py", line 173, in filter(None, (self.load_plugin(name) for name in self.available_plugins))

File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\manager.py", line 148, in load_plugin module = importlib.import_module( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\importlib__init.py", line 127, in import_mo dule return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\manager.py", line 237, in exec_module super().exec_module(module) File "", line 846, in exec_module File "", line 983, in get_code File "", line 913, in source_to_code File "", line 228, in _call_with_frames_removed File "C:\Users\Administrator\Desktop\zhenxun\zhenxun_bot\extensive_plugin\zhenxun_plugin_DouyinShare\init__.py", lin e 106 if res.['code'] != 201: ^ SyntaxError: invalid syntax

HibiKier commented 1 year ago

zhenxun_plugin_DouyinShare插件问题