Ken Giusti created PROTON-1843:
----------------------------------
Summary: Cannot use unicode string in Condition description
Key: PROTON-1843
URL: https://issues.apache.org/jira/browse/PROTON-1843
Project: Qpid Proton
Issue Type: Bug
Components: python-binding
Affects Versions: proton-c-0.22.0
Reporter: Ken Giusti
Attachments: test.py
Under python2.7, attempting to set a condition on a delivery using a unicode
string causes a traceback:
Traceback (most recent call last):
File "./test.py", line 64, in <module>
Container(Test(opts.address)).run()
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/reactor.py",
line 148, in run
while self.process(): pass
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/reactor.py",
line 174, in process
self._check_errors()
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/reactor.py",
line 170, in _check_errors
_compat.raise_(exc, value, tb)
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/__init__.py",
line 3478, in dispatch
ev.dispatch(self.handler)
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/__init__.py",
line 3390, in dispatch
self.dispatch(h, type)
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/__init__.py",
line 3387, in dispatch
result = dispatch(handler, type.method, self)
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/__init__.py",
line 3265, in dispatch
return m(*args)
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/handlers.py",
line 173, in on_delivery
self.on_message(event)
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/handlers.py",
line 195, in on_message
dispatch(self.delegate, 'on_message', event)
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/__init__.py",
line 3265, in dispatch
return m(*args)
File "./test.py", line 48, in on_message
self.reject(event.delivery)
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/handlers.py",
line 130, in reject
self.settle(delivery, Delivery.REJECTED)
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/handlers.py",
line 146, in settle
delivery.update(state)
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/__init__.py",
line 2631, in update
obj2cond(self.local._condition, pn_disposition_condition(self.local._impl))
File
"/home/kgiusti/tmp/051118/venv/lib/python2.7/site-packages/proton/__init__.py",
line 1788, in obj2cond
pn_condition_set_description(cond, obj.description)
TypeError: in method 'pn_condition_set_description', argument 2 of type 'char
const *'
See attached reproducer.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]