-
Notifications
You must be signed in to change notification settings - Fork 51
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
Problems with python throws #79
Comments
@IvanBrasilico got the same issue, I'll work on this one as soon as possible. |
It seems to be bigger then I thought: python/asyncio#397. @mawkee have you ever got in this issue? |
I'm facing this as well - and, sadly enough, the solutions presented don't seem to work... |
I couldn't reproduce the same issue in a simpler example. A import asyncio
async def subtask():
print('subtask')
# raise
async def main():
print('main')
# raise
await asyncio.gather(subtask())
await main()
loop = asyncio.get_event_loop()
loop.create_task(main())
loop.run_forever() Running this example: ❯ python example.py
main
subtask
Task exception was never retrieved
future: <Task finished coro=<main() done, defined at async.py:8> exception=RuntimeError('No active exception to reraise',)>
Traceback (most recent call last):
File "~/.pyenv/versions/3.5-dev/lib/python3.5/asyncio/tasks.py", line 242, in _step
result = coro.throw(exc)
File "async.py", line 10, in main
await asyncio.gather(subtask())
File "~/.pyenv/versions/3.5-dev/lib/python3.5/asyncio/futures.py", line 381, in __iter__
yield self # This tells Task to wait for completion.
File "~/.pyenv/versions/3.5-dev/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
future.result()
File "~/.pyenv/versions/3.5-dev/lib/python3.5/asyncio/futures.py", line 294, in result
raise self._exception
File "~/.pyenv/versions/3.5-dev/lib/python3.5/asyncio/tasks.py", line 240, in _step
result = coro.send(None)
File "async.py", line 6, in subtask
raise But in a view, if I do something like this, bottery won't show the error: def pong(message):
raise |
Maybe the views must be assyncronous functions too. |
Whats happen?
For any reason python does not throw any exception during
bottery run
How reproduce it?
In my case I'm testing some stuff that I've done in this PR: #78, so you can jump on my branch and do this steps:
pip install -e ../bottery/path
The text was updated successfully, but these errors were encountered: