ERROR: test_unpack (tests.v0x01.test_controller2switch.test_packet_out.TestPacketOut)
Check whether the dump file equals to unpacked object.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/crypt/noBackup/repos/python-openflow/pyof/v0x01/foundation/base.py", line 144, in unpack
self._value = struct.unpack_from(self._fmt, buff, offset)[0]
struct.error: unpack_from requires a buffer of at least 2 bytes
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/crypt/noBackup/repos/python-openflow/tests/teststruct.py", line 125, in test_unpack
unpacked = self.get_raw_dump().unpack()
File "/crypt/noBackup/repos/python-openflow/tests/rawdump.py", line 45, in unpack
return _unpack_message(header, raw_msg)
File "/crypt/noBackup/repos/python-openflow/tests/rawdump.py", line 56, in _unpack_message
msg.unpack(raw_msg)
File "/crypt/noBackup/repos/python-openflow/pyof/v0x01/foundation/base.py", line 453, in unpack
attribute.unpack(buff, begin)
File "/crypt/noBackup/repos/python-openflow/pyof/v0x01/foundation/basic_types.py", line 376, in unpack
item.unpack(binary_item)
File "/crypt/noBackup/repos/python-openflow/pyof/v0x01/foundation/base.py", line 400, in unpack
attribute.unpack(buff, begin)
File "/crypt/noBackup/repos/python-openflow/pyof/v0x01/foundation/base.py", line 148, in unpack
raise exceptions.UnpackException("Error while unpacking data from "
pyof.v0x01.foundation.exceptions.UnpackException: Error while unpacking data from buffer
It seems that it is trying to unpack a buffer of length 1. Maybe we can start by adding details to the stack trace.
The output below is from the tests of branch issue-#8-packing-tests.
It seems that it is trying to unpack a buffer of length 1. Maybe we can start by adding details to the stack trace.