kombu icon indicating copy to clipboard operation
kombu copied to clipboard

zlib doesn't support memoryview

Open Kronuz opened this issue 7 years ago • 1 comments

When using Python 2.7.13, I'm getting the following:

body: <memory at 0x7f314a00acc8> (1016b)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/kombu/message.py", line 62, in _reraise_error
    reraise(*self.errors[0])
  File "/usr/local/lib/python2.7/site-packages/kombu/message.py", line 49, in __init__
    body = decompress(body, compression)
  File "/usr/local/lib/python2.7/site-packages/kombu/compression.py", line 70, in decompress
    return get_decoder(content_type)(body)
TypeError: decompress() argument 1 must be string or read-only buffer, not memoryview

The reason is zlib.decompress() doesn't (and neither does zlib.compress()) take memoryview.

Kronuz avatar Aug 23 '18 14:08 Kronuz

Thanks for reporting this. Could you perhaps provide a code sample to reproduce this? Thanks.

georgepsarakis avatar Aug 24 '18 04:08 georgepsarakis