-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
str() cannot handle the message which contain non-ascii characters. #180
Comments
@iamhappg the str() calls only appear to be in the exception handler code so I think the real problem is being swallowed (i.e. exception handler throws the "str()" exception when trying to print the original exception). It appears that an odd exception object is being thrown in your context (openstack) that doesn't support conversion via str(). Can you try adding this in websocket.py before line 724 for debug?
|
I think the other issue here is that we should probably be using |
As I know, the user saw the bug on japanese environment. |
To get the exception in detail, I add the debug code "import traceback" and "traceback.print_exc()" 2015-07-03 11:22:22.371 18566 INFO oslo.messaging._drivers.impl_rabbit [req-dffdf2ce-71f3-4ba8-a4e9-80037b2253d5 ] Connected to AMQP server on 10.104.0.80:5671 |
[root@wrhel novnc]# /usr/bin/nova-novncproxy --web /usr/share/novnc
WebSocket server settings:
Listen on 10.91.32.12:6080
Flash security policy server
Web server. Web root: /usr/share/novnc
No SSL/TLS support (no cert file)
proxying from 10.91.32.12:6080 to ignore:ignore
1: 10.91.100.1: new handler Process
1: 10.91.100.1: "GET /vnc_auto.html?token=a4ea95cc-4de7-4c74-82bb-fb6e988139c2&title=test-002(9d848921-4632-4ca4-97ea-4c811745a57b) HTTP/1.1" 200 -
2: 10.91.100.1: new handler Process
3: 10.91.100.1: new handler Process
2: 10.91.100.1: "GET /include/base.css HTTP/1.1" 200 -
3: 10.91.100.1: "GET /include/vnc.js HTTP/1.1" 200 -
4: 10.91.100.1: new handler Process
5: 10.91.100.1: new handler Process
4: 10.91.100.1: "GET /include/util.js HTTP/1.1" 200 -
5: 10.91.100.1: "GET /include/webutil.js HTTP/1.1" 200 -
6: 10.91.100.1: new handler Process
7: 10.91.100.1: new handler Process
8: 10.91.100.1: new handler Process
6: 10.91.100.1: "GET /include/base64.js HTTP/1.1" 200 -
9: 10.91.100.1: new handler Process
7: 10.91.100.1: "GET /include/websock.js HTTP/1.1" 200 -
10: 10.91.100.1: new handler Process
11: 10.91.100.1: new handler Process
9: 10.91.100.1: "GET /include/des.js HTTP/1.1" 200 -
8: 10.91.100.1: "GET /include/input.js HTTP/1.1" 200 -
10: 10.91.100.1: "GET /include/display.js HTTP/1.1" 200 -
12: 10.91.100.1: new handler Process
11: 10.91.100.1: "GET /include/rfb.js HTTP/1.1" 200 -
12: 10.91.100.1: "GET /include/jsunzip.js HTTP/1.1" 200 -
13: 10.91.100.1: new handler Process
13: 10.91.100.1: Plain non-SSL (ws://) WebSocket connection
13: 10.91.100.1: Version hybi-13, base64: 'True'
13: 10.91.100.1: Path: '/websockify'
Process Process-13:
Traceback (most recent call last):
File "/usr/lib64/python2.6/multiprocessing/process.py", line 232, in _bootstrap
self.run()
File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
self._target(_self._args, *_self._kwargs)
File "/usr/lib/python2.6/site-packages/websockify/websocket.py", line 724, in top_new_client
self.msg("handler exception: %s" % str(exc))
File "/usr/lib/python2.6/site-packages/nova/openstack/common/gettextutils.py", line 283, in str
raise UnicodeError(msg)
UnicodeError: Message objects do not support str() because they may contain non-ascii characters. Please use unicode() or translate() instead.
The text was updated successfully, but these errors were encountered: