-
-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
Steps to reproduce:
-
Setup official demo: https://github.com/aio-libs/aiohttp_debugtoolbar/blob/master/demo/README.rst
-
Create empty HTML file in static files directory:
$ touch demo/static/test.html
-
Start demo:
$ python demo/demo.py
-
Open
http://localhost:9000/static/test.htmlin browser.
Expected behavior: empty html is being rendered in the browser and no errors occurs.
Observed behavior: empty html is being rendered in the browser, but in the console following stack trace occurs:
$ python demo/demo.py
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:demo/demo.py:Server started at http://127.0.0.1:9000
ERROR:aiohttp.web:Error handling request
Traceback (most recent call last):
File "/home/bob/stuff/aiohttp_debugtoolbar/demo/aiohttp_debugtoolbar/lib/python3.4/site-packages/aiohttp/server.py", line 272, in start
yield from self.handle_request(message, payload)
File "/home/bob/stuff/aiohttp_debugtoolbar/demo/aiohttp_debugtoolbar/lib/python3.4/site-packages/aiohttp/web.py", line 85, in handle_request
resp = yield from handler(request)
File "/home/bob/stuff/aiohttp_debugtoolbar/aiohttp_debugtoolbar/middlewares.py", line 141, in toolbar_middleware
toolbar.inject(request, response)
File "/home/bob/stuff/aiohttp_debugtoolbar/aiohttp_debugtoolbar/toolbar.py", line 57, in inject
response_html = response.body
AttributeError: 'StreamResponse' object has no attribute 'body'Metadata
Metadata
Assignees
Labels
No labels