On OS X, my code works fine. Trying the exact code out on ubuntu, I get a syntax error:
ubuntu@home:server$ python3 server.py
File "server.py", line 39
async def hello(websocket, path):
^
SyntaxError: invalid syntax
I used pip3 install asyncio to install asyncio
I also tried upgrading to python 3.5, but it causes a ton of library errors with other libraries, so far I can't get this working with python 3.5 on ubuntu although it works with python 3.5 on OS X.