I have tried to run a code that binds a socket in python2.7 in python3.6:
from nanomsg import REP, Socket, PAIR a = Socket(REP) a.bind("ipc://bla")
On python 2.7 the code works yet the output in python3.6 is:
/usr/local/lib/python3.6/dist-packages/nanomsg_wrappers/__init__.py:22: UserWarning: Could not load the default wrapper for your platform: cpy, performance may be affected! "%s, performance may be affected!") % (default,)) Traceback (most recent call last): File "engine.py", line 5, in <module> a.bind("ipc://bla") File "/usr/local/lib/python3.6/dist-packages/nanomsg/__init__.py", line 273, in bind wrapper.nn_bind(self._fd, address) ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type
Hi.
I have tried to run a code that binds a socket in python2.7 in python3.6:
from nanomsg import REP, Socket, PAIR a = Socket(REP) a.bind("ipc://bla")
On python 2.7 the code works yet the output in python3.6 is:
/usr/local/lib/python3.6/dist-packages/nanomsg_wrappers/__init__.py:22: UserWarning: Could not load the default wrapper for your platform: cpy, performance may be affected! "%s, performance may be affected!") % (default,)) Traceback (most recent call last): File "engine.py", line 5, in <module> a.bind("ipc://bla") File "/usr/local/lib/python3.6/dist-packages/nanomsg/__init__.py", line 273, in bind wrapper.nn_bind(self._fd, address) ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type
I stumbled an old issue : https://github.com/tonysimpson/nanomsg-python/issues/13 And according to it I changed the code to
from nanomsg import REP, Socket, PAIR a = Socket(REP) a.bind("ipc://bla".encode())
It seems to fix it.