Giter VIP home page Giter VIP logo

nonebot_plugin_antiflash's People

Contributors

kafcoppelia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nonebot_plugin_antiflash's Issues

.env.prod里添加了默认配置.启动还是报错了

.env.prod里添加了默认配置.
ANTI_FLASH_ON=true # 全局开关
ANTI_FLASH_GROUP=[ ] # 默认开启的群聊,但可通过指令开关
ANTI_FLASH_PATH="your-path-to-config.json" # 配置文件路径,默认同插件代码路径

启动还是报错了
07-04 14:27:28 [ERROR] nonebot | Failed to import "nonebot_plugin_antiflash"
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\bot\NB\venv\Scripts\nb.exe_main
.py", line 7, in
sys.exit(main())
File "C:\bot\NB\venv\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\bot\NB\venv\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\bot\NB\venv\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\bot\NB\venv\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\bot\NB\venv\lib\site-packages\click\core.py", line 760, in invoke
return _callback(*args, **kwargs)
File "C:\bot\NB\venv\lib\site-packages\nb_cli\commands\main.py", line 30, in run
run_bot(file, app)
File "C:\bot\NB\venv\lib\site-packages\nb_cli\handlers\deploy.py", line 20, in run_bot
module = importlib.import_module(module_name)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib_init
.py", line 126, in import_m
odule
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\bot\NB\LittlePaimon.\bot.py", line 26, in
nonebot.load_from_toml("pyproject.toml")
File "C:\bot\NB\venv\lib\site-packages\nonebot\plugin\load.py", line 119, in load_from_toml
return load_all_plugins(plugins, plugin_dirs)
File "C:\bot\NB\venv\lib\site-packages\nonebot\plugin\load.py", line 53, in load_all_plugins
return manager.load_all_plugins()
File "C:\bot\NB\venv\lib\site-packages\nonebot\plugin\manager.py", line 172, in load_all_plugins
return set(
File "C:\bot\NB\venv\lib\site-packages\nonebot\plugin\manager.py", line 173, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))

File "C:\bot\NB\venv\lib\site-packages\nonebot\plugin\manager.py", line 144, in load_plugin
module = importlib.import_module(name)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_m
odule
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\bot\NB\venv\lib\site-packages\nonebot\plugin\manager.py", line 237, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\bot\NB\venv\lib\site-packages\nonebot_plugin_antiflash_init
.py", line 7, in
from .config import handler
File "C:\bot\NB\venv\lib\site-packages\nonebot_plugin_antiflash\config.py", line 83, in
handler = AntiFlashHandler(config)
File "C:\bot\NB\venv\lib\site-packages\nonebot_plugin_antiflash\config.py", line 29, in init
with open(self.path, "w", encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'your-path-to-config.json\config.json'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.