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

添加图片报错 #23

Open
thankU-ubi opened this issue Aug 25, 2022 · 1 comment
Open

添加图片报错 #23

thankU-ubi opened this issue Aug 25, 2022 · 1 comment

Comments

@thankU-ubi
Copy link

thankU-ubi commented Aug 25, 2022

QQ截图20220825234148

如图,在img文件夹添加图片之后,删除菜单中其他菜测试
image

BOT无反应

日志如下

08-25 23:42:15 [SUCCESS] nonebot | ONEBOT V11 2821521344 | [message.group.normal]: Message -1918647081 from 609638635@[ 群:1006443456] "晚上吃什么"
08-25 23:42:15 [INFO] nonebot | Event will be handled by <Matcher from nonebot_plugin_what2eat, type=message, priority=15, temp=False>
08-25 23:42:15 [INFO] nonebot | Matcher <Matcher from nonebot_plugin_what2eat, type=message, priority=15, temp=False> running complete
08-25 23:42:15 [ERROR] nonebot | Running matcher <Matcher from nonebot_plugin_what2eat, type=message, priority=15, temp=False> failed.
Traceback (most recent call last):
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\Scripts\nb.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nb_cli\commands\main.py", line 30, in run
    run_bot(file, app)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nb_cli\handlers\deploy.py", line 25, in run_bot
    nonebot.run(app=f"{module_name}:{app}")
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\__init__.py", line 261, in run
    get_driver().run(*args, **kwargs)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\drivers\fastapi.py", line 170, in run
    uvicorn.run(
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\uvicorn\main.py", line 576, in run
    server.run()
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\uvicorn\server.py", line 60, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\asyncio\base_events.py", line 603, in run_until_complete
    self.run_forever()
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\asyncio\windows_events.py", line 316, in run_forever
    super().run_forever()
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\asyncio\base_events.py", line 570, in run_forever
    self._run_once()
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\asyncio\base_events.py", line 1859, in _run_once
    handle._run()
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\asyncio\events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\message.py", line 146, in _check_matcher
    await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
> File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\message.py", line 196, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\internal\matcher.py", line 672, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\internal\matcher.py", line 639, in simple_run
    await handler(
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot\dependencies\__init__.py", line 92, in __call__
    return await self.call(**values)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot_plugin_what2eat\__init__.py", line 45, in _
    msg = eating_manager.get2eat(event)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot_plugin_what2eat\data_source.py", line 48, in get2eat
    self._eating = load_json(self._eating_json)
  File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\nonebot_plugin_what2eat\utils.py", line 53, in load_json
    return json.load(f)
ValueError: Unexpected character found when decoding array value (1)
@KafCoppelia
Copy link
Member

basic food被手动编辑过吧?格式错了,菠萝披萨末尾多了一个逗号。这个文件可以后台改,但是记得格式要正确。

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