[ https://issues.apache.org/jira/browse/QPID-6197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14200320#comment-14200320 ]
Brian Bouterse commented on QPID-6197: -------------------------------------- Also after doing all of this (uninstall/reinstall) I was able to reproduce this issue once again. Same traceback as in the original report. > qpid.messaging does not support unicode for username > ---------------------------------------------------- > > Key: QPID-6197 > URL: https://issues.apache.org/jira/browse/QPID-6197 > Project: Qpid > Issue Type: Bug > Components: Python Client > Affects Versions: 0.26 > Reporter: Brian Bouterse > Priority: Minor > > When using qpid.messaging I cannot use unicode in the connection objects. > Here is a reproducer snippet: > >>> from qpid.messaging.endpoints import Connection > >>> opts = {'username': u'guest', 'sasl_mechanisms': 'ANONYMOUS', 'host': > >>> '127.0.0.1', 'timeout': 4, 'password': '', 'port': 5672, 'transport': > >>> 'tcp'} > >>> Connection.establish(**opts) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib/python2.7/site-packages/qpid/messaging/endpoints.py", line > 68, in establish > conn.open(timeout=timeout) > File "<string>", line 6, in open > File "/usr/lib/python2.7/site-packages/qpid/messaging/endpoints.py", line > 268, in open > self.attach(timeout=timeout) > File "<string>", line 6, in attach > File "/usr/lib/python2.7/site-packages/qpid/messaging/endpoints.py", line > 286, in attach > if not self._ewait(lambda: self._transport_connected and not > self._unlinked(), timeout=timeout): > File "/usr/lib/python2.7/site-packages/qpid/messaging/endpoints.py", line > 219, in _ewait > self.check_error() > File "/usr/lib/python2.7/site-packages/qpid/messaging/endpoints.py", line > 212, in check_error > raise e > qpid.messaging.exceptions.InternalError: Traceback (most recent call last): > File "/usr/lib/python2.7/site-packages/qpid/messaging/driver.py", line 652, > in write > op.dispatch(self) > File "/usr/lib/python2.7/site-packages/qpid/ops.py", line 84, in dispatch > getattr(target, handler)(self, *args) > File "/usr/lib/python2.7/site-packages/qpid/messaging/driver.py", line 713, > in do_connection_start > mechanism=mech, response=initial)) > File "/usr/lib/python2.7/site-packages/qpid/messaging/driver.py", line 684, > in write_op > self._op_enc.write(op) > File "/usr/lib/python2.7/site-packages/qpid/framing.py", line 218, in write > enc = self.encode_compound(op) > File "/usr/lib/python2.7/site-packages/qpid/framing.py", line 244, in > encode_compound > sc.write_compound(op) > File "/usr/lib/python2.7/site-packages/qpid/codec010.py", line 327, in > write_compound > sc.write_fields(op) > File "/usr/lib/python2.7/site-packages/qpid/codec010.py", line 365, in > write_fields > enc(value) > File "/usr/lib/python2.7/site-packages/qpid/codec010.py", line 229, in > write_vbin32 > self.write(b) > File "/usr/lib/python2.7/site-packages/qpid/codec010.py", line 401, in write > self.encoded += s > UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in position 7: > ordinal not in range(128) > If you change username from u'guest' to 'guest' it works. I tested the other > strings referenced in the above dictionary and no other string besides > username being unicode caused a traceback. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org