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

Unicode strings passed in through python binding cause exceptions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • proton-0.9
    • proton-0.9
    • python-binding
    • Ubuntu 14.04.1 64-bit

    Description

      The following traceback was thrown when passing in a python unicode string for a host name. Ensuring the string is a python binary string (UTF-8) is a work around.

      Traceback
      Traceback (most recent call last):
        File "./arc", line 246, in <module>
          curses.wrapper(main)
        File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
          return func(stdscr, *args, **kwds)
        File "./arc", line 244, in main
          drv.run()
        File "/home/kkleidal/datawire/server/common.py", line 270, in run
          self.process_events()
        File "/home/kkleidal/datawire/server/common.py", line 315, in process_events
          ev.dispatch(h)
        File "/usr/lib/python2.7/dist-packages/proton/__init__.py", line 3365, in dispatch
          return dispatch(handler, self.type.method, self)
        File "/usr/lib/python2.7/dist-packages/proton/__init__.py", line 3311, in dispatch
          return m(*args)
        File "/home/kkleidal/datawire/server/common.py", line 723, in on_link_remote_close
          self.connect(network)
        File "/home/kkleidal/datawire/server/common.py", line 709, in connect
          self.conn.hostname = network.host
        File "/usr/lib/python2.7/dist-packages/proton/wrapper.py", line 54, in __setattr__
          object.__setattr__(self, name, value)
        File "/usr/lib/python2.7/dist-packages/proton/__init__.py", line 2319, in _set_hostname
          return pn_connection_set_hostname(self._impl, name)
      TypeError: in method 'pn_connection_set_hostname', argument 2 of type 'char const *'
      

      Attachments

        Activity

          People

            rhs Rafael H. Schloming
            kkleidal Ken Leidal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: