G

Message can't be sent due to encoding problems

In libervia, when sending accentuated characters, I receive this stacK: 2016-04-16 16:21:33+0200 [_GenericHTTPChannelProtocol,2,127.0.0.1] Unhandled Error Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/twisted/web/http.py", line 1439, in dataReceived finishCallback(data[contentLength:]) File "/usr/local/lib/python2.7/site-packages/twisted/web/http.py", line 1704, in _finishRequestBody self.allContentReceived() File "/usr/local/lib/python2.7/site-packages/twisted/web/http.py", line 1767, in allContentReceived req.requestReceived(command, path, version) File "/usr/local/lib/python2.7/site-packages/twisted/web/http.py", line 768, in requestReceived self.process() --- <exception caught here> --- File "/usr/local/lib/python2.7/site-packages/twisted/web/server.py", line 183, in process self.render(resrc) File "/usr/local/lib/python2.7/site-packages/twisted/web/server.py", line 234, in render body = resrc.render(self) File "/usr/local/lib/python2.7/site-packages/libervia/server/server.py", line 401, in render return jsonrpc.JSONRPC.render(self, request) File "/usr/local/lib/python2.7/site-packages/txjsonrpc/web/jsonrpc.py", line 127, in render log.msg("Client({}): {}".format(request.client, content)) exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 144: ordinal not in range(128) Sending it again without the culprit char is OK. Regards
G

Adrien 17/04/2016, 17:26

I can't reproduce :-/

G

Xavier Maillard 17/04/2016, 20:06

I can reproduce endlessly. Browsers: Firefox and Safari. 2016-04-17 22:04:23+0200 [_GenericHTTPChannelProtocol,30,127.0.0.1] Unhandled Error Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/twisted/web/http.py", line 1439, in dataReceived finishCallback(data[contentLength:]) File "/usr/local/lib/python2.7/site-packages/twisted/web/http.py", line 1704, in _finishRequestBody self.allContentReceived() File "/usr/local/lib/python2.7/site-packages/twisted/web/http.py", line 1767, in allContentReceived req.requestReceived(command, path, version) File "/usr/local/lib/python2.7/site-packages/twisted/web/http.py", line 768, in requestReceived self.process() --- <exception caught here> --- File "/usr/local/lib/python2.7/site-packages/twisted/web/server.py", line 183, in process self.render(resrc) File "/usr/local/lib/python2.7/site-packages/twisted/web/server.py", line 234, in render body = resrc.render(self) File "/usr/local/lib/python2.7/site-packages/libervia/server/server.py", line 401, in render return jsonrpc.JSONRPC.render(self, request) File "/usr/local/lib/python2.7/site-packages/txjsonrpc/web/jsonrpc.py", line 127, in render log.msg("Client({}): {}".format(request.client, content)) exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 144: ordinal not in range(128) 2016-04-17 22:04:23+0200 [_GenericHTTPChannelProtocol,30,127.0.0.1] "127.0.0.1" - - [17/Apr/2016:20:04:23 +0000] "POST /json_api HTTP/1.1" 500 1051 "http://localhost:8080/libervia_main.safari.cache.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17" 2016-04-17 22:04:23+0200 [-] "127.0.0.1" - - [17/Apr/2016:20:04:23 +0000] "POST /json_api HTTP/1.1" 500 1051 "http://localhost:8080/libervia_main.safari.cache.html" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.17 (KHTML, like Gecko) Version/9.1 Safari/601.5.17"

G

Xavier Maillard 17/04/2016, 20:08

Notice: same thing when trying to comment (same stack). What should I check on my side to help ?

id

132

author

Xavier Maillard

created

16/04/2016, 17:26

updated

17/04/2016, 20:08

labels
Libervia
type
bug
status
queued
priority
normal
milestone
0.7
severity
normal