Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-1843

Cannot use unicode string in Condition description

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: proton-c-0.22.0
    • Fix Version/s: None
    • Component/s: python-binding
    • Labels:
      None

      Description

      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.

        Attachments

        1. test.py
          2 kB
          Ken Giusti

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kgiusti Ken Giusti
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: