Open apirogov opened 8 years ago
I also have same error. Is this because of we using python3?
I also have this error, I am also using python3.
I also confirm this with Python 3. Runs good with Python 2. I'll take a look.
Traceback (most recent call last):
File "/home/alex/.virtualenvs/services/lib/python3.4/site-packages/gevent/greenlet.py", line 534, in run
result = self._run(*self.args, **self.kwargs)
File "/home/alex/.virtualenvs/services/lib/python3.4/site-packages/gevent/baseserver.py", line 25, in _handle_and_close_when_done
return handle(*args_tuple)
File "/home/alex/.virtualenvs/services/lib/python3.4/site-packages/gevent/pywsgi.py", line 1253, in handle
handler.handle()
File "/home/alex/.virtualenvs/services/lib/python3.4/site-packages/gevent/pywsgi.py", line 443, in handle
result = self.handle_one_request()
File "/home/alex/.virtualenvs/services/lib/python3.4/site-packages/gevent/pywsgi.py", line 658, in handle_one_request
self.handle_one_response()
File "/home/alex/.virtualenvs/services/lib/python3.4/site-packages/gevent/pywsgi.py", line 916, in handle_one_response
self.log_request()
File "/home/alex/.virtualenvs/services/lib/python3.4/site-packages/geventwebsocket/handler.py", line 236, in log_request
if '101' not in self.status:
TypeError: 'str' does not support the buffer interface
<Greenlet at 0x7efcaa0fa2a8: _handle_and_close_when_done(<bound method WSGIServer.handle of <WSGIServer at , <bound method WSGIServer.do_close of <WSGIServer a, (<gevent._socket3.socket [closed] object, fd=-1, )> failed with TypeError
Any update? I'm getting it on python3 also.
Maybe this would be a solution: https://www.mkyong.com/python/python-3-typeerror-str-does-not-support-the-buffer-interface/
I too have the same issue with TypeError on python 3.
the example seems to be incorrect, should be
something = {'data':'test'}
ws.send(message=json.dumps(something))
Still having this issue. It's 2020 and it breaks in python 3 -_-
Even when just trying the first example ("simple usage"), I get the following exception on each request:
the strange thing is, the http requests work fine. I did not try the websocket route yet, as I first wanted to know if I'm doing something wrong or is this a bug?