pypi / warehouse

The Python Package Index
https://pypi.org
Apache License 2.0
3.55k stars 955 forks source link

Byte string conversion #11722

Closed rubenhartenstein closed 2 years ago

rubenhartenstein commented 2 years ago

Hi there,

I receive the following bytestring:

b'RFH \x02\x00\x00\x00\xec\x03\x00\x00"\x02\x00\x00\xb8\x04\x00\x00MQSTR \x00\x00\x00\x00\xb8\x04\x00\x00 \x00\x00\x00jms_text d\x00\x00\x00 ...'

I want to receive it converted from MQ as a string but I receive the above bytestring. I used the following coding: def initialize_mq(self): self.logger.debug("initialize_mq entered!")

    # Message Descriptor
    self.md = pymqi.MD()

    # Get Message Options
    self.gmo = pymqi.GMO()
    self.gmo.Options = pymqi.CMQC.MQGMO_WAIT | pymqi.CMQC.MQGMO_FAIL_IF_QUIESCING | pymqi.CMQC.MQGMO_CONVERT
    self.gmo.WaitInterval = 5000  # 5 seconds

    self.qmgr = pymqi.connect(self.queue_manager, self.channel, self.conn_info)
    self.queue = pymqi.Queue(self.qmgr, self.queue_name)

    self.logger.debug("initialize_mq left!")

In another method I call: self.message_text = self.queue.get(None, self.md, self.gmo)

But the conversion seems not to work. What am I doing wrong?

This is how it looks like in MQ Admin: image

Best regards Ruben Hartenstein

di commented 2 years ago

Hi, this issue tracker is for issues with the codebase behind https://pypi.org itself, not the projects hosted on PyPI.

You should report this issue to the tracker for the project in question instead.

rubenhartenstein commented 2 years ago

Sorry!