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

发送酷 Q 如果因网络问题没有成功上报消息,之后连续快速上报会导致 NoneBot 出现 bug #5

Closed
richardchien opened this Issue Aug 20, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@richardchien
Copy link
Owner

richardchien commented Aug 20, 2018

[2018-08-20 23:42:05,238 none] DEBUG: NLP results: [NLPResult(confidence=60.0, cmd_name='tuling', cmd_args={'message': '你是谁'})]
[2018-08-20 23:42:05,238 none] DEBUG: NLP result with highest confidence: NLPResult(confidence=60.0, cmd_name='tuling', cmd_args={'message': '你是谁'})
[2018-08-20 23:42:05,238 none] DEBUG: Running command ('tuling',)
[2018-08-20 23:42:05,244 none] DEBUG: NLP results: [NLPResult(confidence=60.0, cmd_name='tuling', cmd_args={'message': '。。。。'})]
[2018-08-20 23:42:05,244 none] DEBUG: NLP result with highest confidence: NLPResult(confidence=60.0, cmd_name='tuling', cmd_args={'message': '。。。。'})
[2018-08-20 23:42:05,244 none] DEBUG: Running command ('tuling',)
[2018-08-20 23:42:05,627 none] DEBUG: Session of command ('tuling',) finished
[2018-08-20 23:42:05,627 none] INFO: Message 419 is handled as natural language
Task exception was never retrieved
future: <Task finished coro=<handle_message() done, defined at /Users/richard/Projects/none-bot/none/message.py:19> exception=KeyError('/user/1002647525') created at /Users/richard/Projects/none-bot/none/__init__.py:33>
source_traceback: Object created at (most recent call last):
  File "/Users/richard/Projects/none-bot/docs/guide/code/awesome-bot-4/bot.py", line 11, in <module>
    none.run()
  File "/Users/richard/Projects/none-bot/none/__init__.py", line 91, in run
    get_bot().run(host=host, port=port, *args, **kwargs)
  File "/Users/richard/Projects/none-bot/none/__init__.py", line 51, in run
    *args, **kwargs)
  File "/Users/richard/Projects/none-bot/venv/lib/python3.7/site-packages/aiocqhttp/__init__.py", line 184, in run
    self._server_app.run(host=host, port=port, *args, **kwargs)
  File "/Users/richard/Projects/none-bot/venv/lib/python3.7/site-packages/quart/app.py", line 1316, in run
    run_single(self, config, loop=loop)
  File "/Users/richard/Projects/none-bot/venv/lib/python3.7/site-packages/hypercorn/run.py", line 166, in run_single
    loop.run_forever()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 523, in run_forever
    self._run_once()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 1750, in _run_once
    handle._run()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/richard/Projects/none-bot/none/__init__.py", line 33, in _
    asyncio.ensure_future(handle_message(self, ctx))
Traceback (most recent call last):
  File "/Users/richard/Projects/none-bot/none/command.py", line 493, in _real_run_command
    raise _FinishException(res)
none.command._FinishException: True

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/richard/Projects/none-bot/none/message.py", line 52, in handle_message
    handled = await handle_natural_language(bot, ctx)
  File "/Users/richard/Projects/none-bot/none/natural_language.py", line 138, in handle_natural_language
    check_perm=False)
  File "/Users/richard/Projects/none-bot/none/command.py", line 477, in call_command
    disable_interaction=disable_interaction)
  File "/Users/richard/Projects/none-bot/none/command.py", line 508, in _real_run_command
    del _sessions[ctx_id]
KeyError: '/user/1002647525'
[2018-08-20 23:42:05,693 none] DEBUG: Session of command ('tuling',) finished
[2018-08-20 23:42:05,760 none] DEBUG: Session of command ('tuling',) finished
Task exception was never retrieved
future: <Task finished coro=<handle_message() done, defined at /Users/richard/Projects/none-bot/none/message.py:19> exception=KeyError('/user/1002647525') created at /Users/richard/Projects/none-bot/none/__init__.py:33>
source_traceback: Object created at (most recent call last):
  File "/Users/richard/Projects/none-bot/docs/guide/code/awesome-bot-4/bot.py", line 11, in <module>
    none.run()
  File "/Users/richard/Projects/none-bot/none/__init__.py", line 91, in run
    get_bot().run(host=host, port=port, *args, **kwargs)
  File "/Users/richard/Projects/none-bot/none/__init__.py", line 51, in run
    *args, **kwargs)
  File "/Users/richard/Projects/none-bot/venv/lib/python3.7/site-packages/aiocqhttp/__init__.py", line 184, in run
    self._server_app.run(host=host, port=port, *args, **kwargs)
  File "/Users/richard/Projects/none-bot/venv/lib/python3.7/site-packages/quart/app.py", line 1316, in run
    run_single(self, config, loop=loop)
  File "/Users/richard/Projects/none-bot/venv/lib/python3.7/site-packages/hypercorn/run.py", line 166, in run_single
    loop.run_forever()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 523, in run_forever
    self._run_once()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 1750, in _run_once
    handle._run()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/richard/Projects/none-bot/none/__init__.py", line 33, in _
    asyncio.ensure_future(handle_message(self, ctx))
Traceback (most recent call last):
  File "/Users/richard/Projects/none-bot/none/command.py", line 493, in _real_run_command
    raise _FinishException(res)
none.command._FinishException: True

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/richard/Projects/none-bot/none/message.py", line 52, in handle_message
    handled = await handle_natural_language(bot, ctx)
  File "/Users/richard/Projects/none-bot/none/natural_language.py", line 138, in handle_natural_language
    check_perm=False)
  File "/Users/richard/Projects/none-bot/none/command.py", line 477, in call_command
    disable_interaction=disable_interaction)
  File "/Users/richard/Projects/none-bot/none/command.py", line 508, in _real_run_command
    del _sessions[ctx_id]
KeyError: '/user/1002647525'
[2018-08-20 23:42:05,840 none] DEBUG: Session of command ('tuling',) exists
[2018-08-20 23:42:05,840 none] DEBUG: Running command ('tuling',)
[2018-08-20 23:42:05,959 none] DEBUG: Session of command ('tuling',) finished
[2018-08-20 23:42:05,960 none] INFO: Message 416 is handled as natural language
[2018-08-20 23:42:06,338 none] DEBUG: Session of command ('tuling',) finished
Task exception was never retrieved
future: <Task finished coro=<handle_message() done, defined at /Users/richard/Projects/none-bot/none/message.py:19> exception=KeyError('/user/1002647525') created at /Users/richard/Projects/none-bot/none/__init__.py:33>
source_traceback: Object created at (most recent call last):
  File "/Users/richard/Projects/none-bot/docs/guide/code/awesome-bot-4/bot.py", line 11, in <module>
    none.run()
  File "/Users/richard/Projects/none-bot/none/__init__.py", line 91, in run
    get_bot().run(host=host, port=port, *args, **kwargs)
  File "/Users/richard/Projects/none-bot/none/__init__.py", line 51, in run
    *args, **kwargs)
  File "/Users/richard/Projects/none-bot/venv/lib/python3.7/site-packages/aiocqhttp/__init__.py", line 184, in run
    self._server_app.run(host=host, port=port, *args, **kwargs)
  File "/Users/richard/Projects/none-bot/venv/lib/python3.7/site-packages/quart/app.py", line 1316, in run
    run_single(self, config, loop=loop)
  File "/Users/richard/Projects/none-bot/venv/lib/python3.7/site-packages/hypercorn/run.py", line 166, in run_single
    loop.run_forever()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 523, in run_forever
    self._run_once()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 1750, in _run_once
    handle._run()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/richard/Projects/none-bot/none/__init__.py", line 33, in _
    asyncio.ensure_future(handle_message(self, ctx))
Traceback (most recent call last):
  File "/Users/richard/Projects/none-bot/none/command.py", line 493, in _real_run_command
    raise _FinishException(res)
none.command._FinishException: True

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/richard/Projects/none-bot/none/message.py", line 42, in handle_message
    handled = await handle_command(bot, ctx)
  File "/Users/richard/Projects/none-bot/none/command.py", line 442, in handle_command
    return await _real_run_command(session, ctx_id, check_perm=check_perm)
  File "/Users/richard/Projects/none-bot/none/command.py", line 508, in _real_run_command
    del _sessions[ctx_id]
KeyError: '/user/1002647525'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment