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

Subapps don't work in debug mode #1377

Closed
imbolc opened this issue Nov 7, 2016 · 3 comments
Closed

Subapps don't work in debug mode #1377

imbolc opened this issue Nov 7, 2016 · 3 comments
Labels

Comments

@imbolc
Copy link
Contributor

imbolc commented Nov 7, 2016

Expected behaviour

It expected to work:

from aiohttp import web

app = web.Application(debug=True)
app.router.add_subapp('/sub', web.Application())
web.run_app(app)

Actual behaviour

I got the exception:

Traceback (most recent call last):
  File "app.py", line 5, in <module>
    web.run_app(app)
  File "/home/imbolc/.pyenv/versions/3.5.2/lib/python3.5/site-packages/aiohttp/web.py", line 394, in run_app
    loop=loop))
  File "/home/imbolc/.pyenv/versions/3.5.2/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
    return future.result()
  File "/home/imbolc/.pyenv/versions/3.5.2/lib/python3.5/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/home/imbolc/.pyenv/versions/3.5.2/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/home/imbolc/.pyenv/versions/3.5.2/lib/python3.5/site-packages/aiohttp/web.py", line 330, in startup
    yield from self.on_startup.send(self)
  File "/home/imbolc/.pyenv/versions/3.5.2/lib/python3.5/site-packages/aiohttp/signals.py", line 47, in send
    yield from self._pre.send(ordinal, self._name, *args, **kwargs)
  File "/home/imbolc/.pyenv/versions/3.5.2/lib/python3.5/site-packages/aiohttp/signals.py", line 59, in send
    yield from self._send(ordinal, name, *args, **kwargs)
  File "/home/imbolc/.pyenv/versions/3.5.2/lib/python3.5/site-packages/aiohttp/signals.py", line 14, in _send
    res = receiver(*args, **kwargs)
TypeError: handler() takes 1 positional argument but 3 were given
@asvetlov
Copy link
Member

asvetlov commented Nov 8, 2016

Fixed by c7bbcbc

@asvetlov asvetlov closed this as completed Nov 8, 2016
@asvetlov
Copy link
Member

asvetlov commented Nov 8, 2016

Thanks for bug report.

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants