{"action":"opened","issue":{"url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/753","labels_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/753/labels{/name}","comments_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/753/comments","events_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/753/events","html_url":"https://github.com/KeepSafe/aiohttp/issues/753","id":129525396,"number":753,"title":"Websockets in variables","user":{"login":"Insoleet","id":1170293,"avatar_url":"https://avatars.githubusercontent.com/u/1170293?v=3","gravatar_id":"","url":"https://api.github.com/users/Insoleet","html_url":"https://github.com/Insoleet","followers_url":"https://api.github.com/users/Insoleet/followers","following_url":"https://api.github.com/users/Insoleet/following{/other_user}","gists_url":"https://api.github.com/users/Insoleet/gists{/gist_id}","starred_url":"https://api.github.com/users/Insoleet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Insoleet/subscriptions","organizations_url":"https://api.github.com/users/Insoleet/orgs","repos_url":"https://api.github.com/users/Insoleet/repos","events_url":"https://api.github.com/users/Insoleet/events{/privacy}","received_events_url":"https://api.github.com/users/Insoleet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-28T17:52:31Z","updated_at":"2016-01-28T17:52:31Z","closed_at":null,"body":"Hello,\r\n\r\nI'm trying to run the following : \r\n```python\r\n\r\nasync def connect():\r\n    the_ws = aiohttp.ws_connect('ws://metab.ucoin.io:9201/ws/block')\r\n    async with the_ws:\r\n\r\n        async for msg in the_ws:\r\n            if msg.tp == aiohttp.MsgType.text:\r\n                print(msg.data)\r\n            elif msg.tp == aiohttp.MsgType.closed:\r\n                break\r\n            elif msg.tp == aiohttp.MsgType.error:\r\n                break\r\n```\r\n\r\nIt fails with the following error : \r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/inso/code/ucoin/sakia/test.py\", line 22, in <module>\r\n    loop.run_until_complete(connect())\r\n  File \"/home/inso/.pyenv/versions/sakia-env/lib/python3.5/site-packages/quamash/__init__.py\", line 243, in run_until_complete\r\n    return future.result()\r\n  File \"/home/inso/.pyenv/versions/3.5.0/lib/python3.5/asyncio/futures.py\", line 274, in result\r\n    raise self._exception\r\n  File \"/home/inso/.pyenv/versions/3.5.0/lib/python3.5/asyncio/tasks.py\", line 239, in _step\r\n    result = coro.send(value)\r\n  File \"/home/inso/code/ucoin/sakia/test.py\", line 10, in connect\r\n    async for msg in the_ws:\r\nTypeError: 'async for' requires an object with __aiter__ method, got _DetachedWSRequestContextManager\r\n```\r\n\r\nIs it a bug or am I supposed to do it differently ?"}}