Closed adhish9899 closed 5 months ago
Hello message is for client / dealer / peer. When used, they will automatically send the hello message when connected or reconnected to the peer socket.
@somdoron Thanks for the response, but I am still getting the same error for dealer.
import zmq
context = zmq.Context()
dealer = context.socket(zmq.DEALER)
hello_msg = b"Hello, World!"
dealer.setsockopt(zmq.HELLO_MSG, hello_msg)
3 dealer = context.socket(zmq.DEALER)
5 hello_msg = b"Hello, World!"
----> 6 dealer.setsockopt(zmq.HELLO_MSG, hello_msg)
File _zmq.py:765, in zmq.backend.cython._zmq.Socket.set()
File _zmq.py:1367, in zmq.backend.cython._zmq._setsockopt()
File _zmq.py:164, in zmq.backend.cython._zmq._check_rc()
ZMQError: Invalid argument
zmq.HELLO_MSG
is a draft socket feature, and only available if you have built libzmq with drafts enabled. pyzmq wheels do not have libzmq with unstable optional features enabled.
If you want to use draft features, you must install pyzmq from source after compiling libzmq with drafts enabled (pip install pyzmq --no-binary pyzmq
, and make sure that zmq.has("draft")
returns True.
Thank you @minrk for your help.
Please use this template for reporting suspected bugs or requests for help.
Issue description
I am getting
ZMQError: Invalid argument
when I am trying to use zmq.HELLO_MSGEnvironment
ubuntu: 22.04 pyzmq.version = '25.1.2'
Minimal test code / Steps to reproduce the issue
What's the actual result? (include assertion message & call stack if applicable)
ZMQError: Invalid argument
What's the expected result?