Skip to content

txzmq/pubsub.py", line 26 -- exception cannot conatenate bytes #84

@alex4747-pub

Description

@alex4747-pub

File "/home/ar/Envs/a3_pyvcluster/lib/python3.7/site-packages/txzmq/pubsub.py", line 26, in publish |class ZmqSubConnection(ZmqConnection):
self.send(tag + b'\0' + message) | """
TypeError: can only concatenate str (not "bytes") to str

def publish(self, message, tag=b''):
"""
Publish message with specified tag.

    :param message: message data
    :type message: str
    :param tag: message tag
    :type tag: str
    """
    self.send(tag + b'\0' + message) <---- It does not work in python3, I tried both tag and message being bytes and it does not work either

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions