Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on binding sockets in python 3.6 #61

Open
DanielRoitenberg opened this issue Aug 27, 2017 · 0 comments
Open

Error on binding sockets in python 3.6 #61

DanielRoitenberg opened this issue Aug 27, 2017 · 0 comments

Comments

@DanielRoitenberg
Copy link

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 : #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant