Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

PacketOut unpacking error #135

@cemsbr

Description

@cemsbr

The output below is from the tests of branch issue-#8-packing-tests.

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.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions