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

KeyboardInterrupt raises error in Agent and Bureau #447

Closed
2 tasks done
Archento opened this issue Jul 4, 2024 · 0 comments · Fixed by #466
Closed
2 tasks done

KeyboardInterrupt raises error in Agent and Bureau #447

Archento opened this issue Jul 4, 2024 · 0 comments · Fixed by #466
Labels
c-bug Category: Something isn't working

Comments

@Archento
Copy link
Member

Archento commented Jul 4, 2024

Prerequisites

  • I checked the documentation and found no answer to my problem
  • I checked the existing issues and made sure there are no similar bug reports

Category

Bug (unexpected behavior)

Expected Behavior

KeyboardInterrupt should be handled gracefully and non-verbose during development.

Observed Behavior

▶ python testing.py
INFO:     [alice]: Hello World!
INFO:     [alice]: Starting server on http://0.0.0.0:8000 (Press CTRL+C to quit)
^CTraceback (most recent call last):
  File "/Users/_/git/uAgents/python/testing.py", line 12, in <module>
    alice.run()
  File "/Users/_/git/uAgents/python/src/uagents/agent.py", line 1010, in run
    self._loop.run_until_complete(self._server.serve())
  File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 641, in run_until_complete
    self.run_forever()
  File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 608, in run_forever
    self._run_once()
  File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 1936, in _run_once
    handle._run()
  File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/_/git/uAgents/python/src/uagents/asgi.py", line 161, in serve
    await self._server.serve()
  File "/Users/_/Library/Caches/pypoetry/virtualenvs/uagents-1OuOmH4j-py3.11/lib/python3.11/site-packages/uvicorn/server.py", line 68, in serve
    with self.capture_signals():
  File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/Users/_/Library/Caches/pypoetry/virtualenvs/uagents-1OuOmH4j-py3.11/lib/python3.11/site-packages/uvicorn/server.py", line 328, in capture_signals
    signal.raise_signal(captured_signal)
KeyboardInterrupt

To Reproduce

Start an agent and invoke a KeyboardInterrupt (CTRL+C).

Version

0.13.0

Environment Details (Optional)

No response

Failure Logs (Optional)

No response

Additional Information (Optional)

No response

@Archento Archento added the c-bug Category: Something isn't working label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-bug Category: Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant