真寻bot问答插件调用时报错
Evilshadowruin opened this issue · 3 comments
Evilshadowruin commented
描述问题:
真寻机器人问答插件调用的时候报错,真寻那边看了日志说是NOnebot2的报错和他们没有关系,所以来这边询问一下。
如何复现?
期望的结果
寻求报错原因及解决方案
环境信息:
- OS: [Windows]
- Python Version: [e.g. 3.9]
- Nonebot Version: [e.g. 2.0.0]
协议端信息:
- 协议端: [e.g. go-cqhttp]
- 协议端版本: [e.g. 1.0.0]
截图或日志
10-12 16:28:30 [INFO] plugins | (USER 1979318585, GROUP private) 添加词条 修改数据 成功!
10-12 16:28:30 [INFO] nonebot | Matcher <Matcher from plugins.word_bank.word_handle, type=message, priority=5, temp=False> running complete
10-12 16:28:30 [ERROR] nonebot | Error when running RunPostProcessors
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-Y33bbWyJ-py3.9\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\pypoetry\Cache\virtualenvs\zhenxun-bot-Y33bbWyJ-py3.9\lib\site-packages\nonebot\message.py", line 222, in _run_matcher
await asyncio.gather(*coros)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-Y33bbWyJ-py3.9\lib\site-packages\nonebot\utils.py", line 138, in run_coro_with_catch
return await coro
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-Y33bbWyJ-py3.9\lib\site-packages\nonebot\dependencies\__init__.py", line 89, in __call__
values = await self.solve(**kwargs)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-Y33bbWyJ-py3.9\lib\site-packages\nonebot\dependencies\__init__.py", line 188, in solve
await checker._solve(**params)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-Y33bbWyJ-py3.9\lib\site-packages\nonebot\internal\params.py", line 210, in _solve
return check_field_type(field, event)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-Y33bbWyJ-py3.9\lib\site-packages\nonebot\dependencies\utils.py", line 51, in check_field_type
_, errs_ = field.validate(value, {}, loc=())
File "pydantic\fields.py", line 857, in pydantic.fields.ModelField.validate
v, errors = self._validate_singleton(v, values, loc, cls)
File "pydantic\fields.py", line 1074, in pydantic.fields.ModelField._validate_singleton
return self._apply_validators(v, values, loc, cls, self.validators)
File "pydantic\fields.py", line 1121, in pydantic.fields.ModelField._apply_validators
v = validator(cls, v, values, self, self.model_config)
File "pydantic\class_validators.py", line 313, in pydantic.class_validators._generic_validator_basic.lambda12
return lambda cls, v, values, field, config: validator(v)
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-Y33bbWyJ-py3.9\lib\site-packages\nonebot\internal\adapter\event.py", line 23, in validate
raise TypeError(f"{value} is incompatible with Event type {cls}")
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-Y33bbWyJ-py3.9\lib\site-packages\nonebot\internal\adapter\event.py", line 42, in __str__
return f"[{self.get_event_name()}]: {self.get_event_description()}"
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-Y33bbWyJ-py3.9\lib\site-packages\nonebot\adapters\onebot\v11\event.py", line 185, in get_event_description
+ "".join(
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-Y33bbWyJ-py3.9\lib\site-packages\nonebot\adapters\onebot\v11\event.py", line 188, in <lambda>
if x.is_text()
AttributeError: 'str' object has no attribute 'is_text'
Evilshadowruin commented
HibiKier commented
我这无法复现这个错误