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

Bug: pydantic.error_wrappers.ValidationError: 1 validation error for HeartbeatMetaEvent #145

Closed
mzdluo123 opened this issue Jan 6, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mzdluo123
Copy link

描述问题:

01-06 11:45:22 [DEBUG] nonebot | CQHTTP | Event Parser Error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\programdata\anaconda3\lib\multiprocessing\spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "c:\programdata\anaconda3\lib\multiprocessing\spawn.py", line 129, in _main
    return self._bootstrap(parent_sentinel)
  File "c:\programdata\anaconda3\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "c:\programdata\anaconda3\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\mzdlu\AppData\Local\pypoetry\Cache\virtualenvs\wowbot-sn9JIuQp-py3.8\lib\site-packages\uvicorn\subprocess.py", line 62, in subprocess_started
    target(sockets=sockets)
  File "C:\Users\mzdlu\AppData\Local\pypoetry\Cache\virtualenvs\wowbot-sn9JIuQp-py3.8\lib\site-packages\uvicorn\main.py", line 390, in run
    loop.run_until_complete(self.serve(sockets=sockets))
  File "c:\programdata\anaconda3\lib\asyncio\base_events.py", line 603, in run_until_complete
    self.run_forever()
  File "c:\programdata\anaconda3\lib\asyncio\base_events.py", line 570, in run_forever
    self._run_once()
  File "c:\programdata\anaconda3\lib\asyncio\base_events.py", line 1859, in _run_once
    handle._run()
  File "c:\programdata\anaconda3\lib\asyncio\events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
> File "C:\Users\mzdlu\AppData\Local\pypoetry\Cache\virtualenvs\wowbot-sn9JIuQp-py3.8\lib\site-packages\nonebot\adapters\cqhttp\bot.py", line 307, in handle_message
    event = model.parse_obj(message)
  File "pydantic\main.py", line 520, in pydantic.main.BaseModel.parse_obj
    return cls(**obj)
  File "pydantic\main.py", line 362, in pydantic.main.BaseModel.__init__
    raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for HeartbeatMetaEvent
status
  none is not an allowed value (type=type_error.none.not_allowed)

Process finished with exit code -1

如何复现?

使用2.0.0a8.post2版本存在该问题,使用post3版本也存在这个问题

期望的结果

正常工作

环境信息:

  • OS: Windows10
  • Python Version: 3.7
  • Nonebot Version: 2.0.0a8.post2

截图

If applicable, add screenshots to help explain your problem.
image

@mzdluo123 mzdluo123 added the bug Something isn't working label Jan 6, 2021
@mzdluo123 mzdluo123 changed the title Bug: Spydantic.error_wrappers.ValidationError: 1 validation error for HeartbeatMetaEvent Bug: pydantic.error_wrappers.ValidationError: 1 validation error for HeartbeatMetaEvent Jan 6, 2021
@yanyongyu
Copy link
Member

yanyongyu commented Jan 6, 2021

请升级最新版本的go-cqhttpMrs4s/go-cqhttp#501

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants