Closed caronc closed 7 years ago
Using CentOS 7 (ships with Python v2.7.5) and get the error: TypeError: Struct() argument 1 must be string, not unicode (see below).
================================= test session starts ================================== platform linux2 -- Python 2.7.5, pytest-3.0.6, py-1.4.31, pluggy-0.4.0 rootdir: /builddir/build/BUILD/asgi_ipc-1.2.0, inifile: plugins: hypothesis-3.6.1 collected 29 items test_asgi_ipc.py FFFFFFFFFFFFFFFssssssssssssss ======================================= FAILURES ======================================= _____________________________ IPCLayerTests.test_capacity ______________________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_capacity> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError ____________________________ IPCLayerTests.test_exceptions _____________________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_exceptions> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError _______________________________ IPCLayerTests.test_flush _______________________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_flush> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError ___________________________ IPCLayerTests.test_flush_groups ____________________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_flush_groups> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError __________________________ IPCLayerTests.test_group_channels ___________________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_group_channels> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError ___________________________ IPCLayerTests.test_group_expiry ____________________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_group_expiry> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError ______________________________ IPCLayerTests.test_groups _______________________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_groups> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError ___________________ IPCLayerTests.test_message_alteration_after_send ___________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_message_alteration_after_send> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError __________________________ IPCLayerTests.test_message_expiry ___________________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_message_expiry> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError _______________________ IPCLayerTests.test_new_channel_failures ________________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_new_channel_failures> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError ____________________ IPCLayerTests.test_new_channel_single_process _____________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_new_channel_single_process> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError _____________________ IPCLayerTests.test_new_channel_single_reader _____________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_new_channel_single_reader> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError _____________________________ IPCLayerTests.test_send_recv _____________________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_send_recv> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError ______________________________ IPCLayerTests.test_strings ______________________________ self = <test_asgi_ipc.IPCLayerTests testMethod=test_strings> def setUp(self): if self.channel_layer is None: raise ValueError("You must define 'channel_layer' when subclassing the conformance tests.") if self.expiry_delay is None: raise ValueError("You must define 'expiry_delay' when subclassing the conformance tests.") if "flush" in self.channel_layer.extensions: > self.channel_layer.flush() /usr/lib/python2.7/site-packages/asgiref/conformance.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:164: in flush self.channel_store.flush() asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x241ab10>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError ___________________________ MemoryDictTests.test_item_access ___________________________ self = <test_asgi_ipc.MemoryDictTests testMethod=test_item_access> def setUp(self): self.instance = MemoryDict("/test-md") > self.instance.flush() test_asgi_ipc.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ asgi_ipc.py:299: in flush self._set_value(self.datatype()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <asgi_ipc.MemoryDict object at 0x24de0d0>, value = {} def _set_value(self, value): assert isinstance(value, self.datatype) try: self.semaphore.acquire(self.death_timeout) except posix_ipc.BusyError: self._reset() self.semaphore.acquire(0) try: self.mmap.seek(0) self.mmap.write(self.signature) towrite = msgpack.packb(value, use_bin_type=True) > self.mmap.write(struct.pack("!I", len(towrite))) E TypeError: Struct() argument 1 must be string, not unicode asgi_ipc.py:265: TypeError ======================== 15 failed, 14 skipped in 0.74 seconds ========================= error: Bad exit status from /var/tmp/rpm-tmp.tFY9zf (%check)
Using CentOS 7 (ships with Python v2.7.5) and get the error: TypeError: Struct() argument 1 must be string, not unicode (see below).