[
https://issues.apache.org/jira/browse/QPID-6197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14196722#comment-14196722
]
Ernest Allen commented on QPID-6197:
------------------------------------
I'm unable to reproduce this with qpid 0.26 on RHEL 6.5 and on Fedora 20
Here are the steps I take:
- download and build the 0.26 broker from
http://qpid.apache.org/releases/qpid-0.26/index.html
- ensure PYTHONPATH references the correct python modules
export
PYTHONPATH=/home/eallen/qpid-0.26/python:/home/eallen/qpid-0.26/extras/qmf/src/py:/home/eallen/qpid-0.26/tools/sr/py:/home/eallen/qpid-0.26/python/examples/api
- run the broker
- run the reproducer snippet in python
$ python
Python 2.6.6 (r266:84292, Sep 4 2013, 07:46:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 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)
<qpid.messaging.endpoints.Connection instance at 0x23f3f38>
>>>
The Connestion.establish call returns a Connection instance.
I also tried on Python 2.7.5 on Fedora 20 with the same results.
Can you verify your PYTHONPATH and the broker version?
> 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: [email protected]
For additional commands, e-mail: [email protected]