First thought this is the same issue as in #26 as I got the same error in a docker container built on top of python:3.6.2-stretch, but also reproducible on a host machine. Using example from the readme:
$ pip3.6 install --user asgi_ipc
Collecting asgi_ipc
Using cached asgi_ipc-1.4.0-py2.py3-none-any.whl
Collecting msgpack-python (from asgi_ipc)
Collecting asgiref~=1.1.2 (from asgi_ipc)
Using cached asgiref-1.1.2-py2.py3-none-any.whl
Collecting posix-ipc>=1.0.0 (from asgi_ipc)
Requirement already satisfied: six in /usr/lib64/python3.6/site-packages (from asgi_ipc)
Installing collected packages: msgpack-python, asgiref, posix-ipc, asgi-ipc
Successfully installed asgi-ipc-1.4.0 asgiref-1.1.2 msgpack-python-0.4.8 posix-ipc-1.0.0
$
$ python3.6
Python 3.6.1 (default, Apr 26 2017, 12:37:57)
[GCC 6.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import asgi_ipc
>>> import asgi_ipc as asgi
>>> channel_layer = asgi.IPCChannelLayer(
... prefix="aeracode",
... message_memory=200 * 1024 * 1024,
... )
>>> channel_layer.send("my_channel", {"text": "Hello ASGI"})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hoefling/.local/lib64/python3.6/site-packages/asgi_ipc/core.py", line 61, in send
channel_size = self.message_store.length(channel)
File "/home/hoefling/.local/lib64/python3.6/site-packages/asgi_ipc/store.py", line 134, in length
with self.mutate_value() as value:
File "/usr/lib64/python3.6/contextlib.py", line 82, in __enter__
return next(self.gen)
File "/home/hoefling/.local/lib64/python3.6/site-packages/asgi_ipc/store.py", line 50, in mutate_value
value = pickle.load(self.mmap)
_pickle.UnpicklingError: invalid load key, '\x00'.
>>>
Not reproducible with python 3.5:
$ python3.5
Python 3.5.3 (default, Mar 25 2017, 06:59:48)
[GCC 6.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import asgi_ipc as asgi
>>> channel_layer = asgi.IPCChannelLayer(
... prefix="aeracode",
... message_memory=200 * 1024 * 1024,
... )
>>> channel_layer.send("my_channel", {"text": "Hello ASGI"})
>>> exit()
First thought this is the same issue as in #26 as I got the same error in a docker container built on top of
python:3.6.2-stretch
, but also reproducible on a host machine. Using example from the readme:Not reproducible with python 3.5: