I am running into an error here:

          self.conn.send(json.dumps(data, cls=RippleEncoder).encode('utf-8'))
      File "/Users/michael/.pyenv/versions/3.3.3/lib/python3.3/site-packages/websocket/__init__.py", line 605, in send
        return self.send_frame(frame)
      File "/Users/michael/.pyenv/versions/3.3.3/lib/python3.3/site-packages/websocket/__init__.py", line 624, in send_frame
        data = frame.format()
      File "/Users/michael/.pyenv/versions/3.3.3/lib/python3.3/site-packages/websocket/__init__.py", line 335, in format
        frame_header += struct.pack("!H", length)
    TypeError: Can't convert 'bytes' object to str implicitly

I think this is because chr() returns a string, struct.pack returns bytes.