[ 
https://issues.apache.org/jira/browse/PROTON-802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14292371#comment-14292371
 ] 

Ken Leidal commented on PROTON-802:
-----------------------------------

Potential patch:  https://reviews.apache.org/r/30282/ 

> Unicode strings passed in through python binding cause exceptions
> -----------------------------------------------------------------
>
>                 Key: PROTON-802
>                 URL: https://issues.apache.org/jira/browse/PROTON-802
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: python-binding
>    Affects Versions: 0.9
>         Environment: Ubuntu 14.04.1 64-bit
>            Reporter: Ken Leidal
>            Priority: Minor
>              Labels: encoding, string
>
> 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.
> {code:title=Traceback|borderStyle=solid}
> 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 *'
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to