title: aiohttp.client_exceptions.ClientResponseError: 400, message='invalid constant string'
body: <p>I was learning some async/await in python, and i wanted to try it, but
  I'm getting this error while trying to connect to chatango via websocket and i don't know what means.</p>
  
  <p>I'm using python 3.6.1 and aiohttp 2.2.3</p>
  
  <p>This is my code:</p>
  
  <pre><code>import asyncio
  import aiohttp
  msgs = []
  async def main():
      async with  aiohttp.ClientSession() as session:
          async with session.ws_connect("ws://s12.chatango.com:8081/") as ws:
              for msg in ws:
                  msgs.append(msg)
                  print(msg)
  
  loop = asyncio.get_event_loop()
  loop.run_until_complete(main())
  loop.close()
  </code></pre>
  
  <p>Full traceback:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Program Files\Python36\lib\site-packages\aiohttp\client_reqrep.py", line 559, in start
      (message, payload) = yield from self._protocol.read()
    File "C:\Program Files\Python36\lib\site-packages\aiohttp\streams.py", line 509, in read
      yield from self._waiter
    File "C:\Program Files\Python36\lib\site-packages\aiohttp\client_proto.py", line 165, in data_received
      messages, upgraded, tail = self._parser.feed_data(data)
    File "aiohttp\_http_parser.pyx", line 274, in aiohttp._http_parser.HttpParser.feed_data (aiohttp/_http_parser.c:4364)
  aiohttp.http_exceptions.BadHttpMessage: 400, message='invalid constant string'
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "C:/Users/joseh/Desktop/a.ws.py", line 42, in &lt;module&gt;
      loop.run_until_complete(main())
    File "C:\Program Files\Python36\lib\asyncio\base_events.py", line 466, in run_until_complete
      return future.result()
    File "C:/Users/joseh/Desktop/a.ws.py", line 34, in main
      async with session.ws_connect("ws://s12.chatango.com:8081/") as ws:
    File "C:\Program Files\Python36\lib\site-packages\aiohttp\client.py", line 603, in __aenter__
      self._resp = yield from self._coro
    File "C:\Program Files\Python36\lib\site-packages\aiohttp\client.py", line 390, in _ws_connect
      proxy_auth=proxy_auth)
    File "C:\Program Files\Python36\lib\site-packages\aiohttp\helpers.py", line 91, in __iter__
      ret = yield from self._coro
    File "C:\Program Files\Python36\lib\site-packages\aiohttp\client.py", line 241, in _request
      yield from resp.start(conn, read_until_eof)
    File "C:\Program Files\Python36\lib\site-packages\aiohttp\client_reqrep.py", line 564, in start
      message=exc.message, headers=exc.headers) from exc
  aiohttp.client_exceptions.ClientResponseError: 400, message='invalid constant string'
  </code></pre>