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

Static handler raises AssertionError #1177

Closed
iceboy233 opened this issue Sep 16, 2016 · 2 comments
Closed

Static handler raises AssertionError #1177

iceboy233 opened this issue Sep 16, 2016 · 2 comments
Labels

Comments

@iceboy233
Copy link
Member

iceboy233 commented Sep 16, 2016

Long story short

Static handler raises AssertionError.

Expected behaviour

from aiohttp import web

app = web.Application()
app.router.add_static('/', '/', show_index=True)
web.run_app(app)

Try to download any file. No errors should be reported.

Actual behaviour

Error log printed out.

Error handling request
Traceback (most recent call last):
  File "/home/iceboy/.local/lib/python3.5/site-packages/aiohttp/server.py", line 261, in start
    yield from self.handle_request(message, payload)
  File "/home/iceboy/.local/lib/python3.5/site-packages/aiohttp/web.py", line 96, in handle_request
    yield from resp.write_eof()
  File "/home/iceboy/.local/lib/python3.5/site-packages/aiohttp/web_reqrep.py", line 772, in write_eof
    yield from self._resp_impl.write_eof()
  File "/home/iceboy/.local/lib/python3.5/site-packages/aiohttp/protocol.py", line 733, in write_eof
    self.write(EOF_MARKER)
  File "/home/iceboy/.local/lib/python3.5/site-packages/aiohttp/protocol.py", line 711, in write
    assert self.writer is not None, 'send_headers() is not called.'
AssertionError: send_headers() is not called.

Steps to reproduce

Run the above python script and download any file.

Your environment

Ubuntu 16.04 x64
aiohttp 1.0.0

@asvetlov
Copy link
Member

Oohh crap!
Thank you for bug report.
Will fix it soon as well as others in bugfix release.

@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