Skip to content

Unicode Decode errors on WIreshark 4.6.0 captures #56

Description

@TheOnlyJoey

Using a fresh capture with Wireshark 4.6.0, I am getting unicode errors upon reading the pcapng file.
Data content is usb data, tried with both Python 3.9 on macOS and 3.13 on Linux (same error)

Traceback (most recent call last):
  File "/home/joey/Documents/Reveng/packet_list.py", line 5, in <module>
    for block in scanner:
                 ^^^^^^^
  File "/usr/local/lib/python3.13/dist-packages/pcapng/scanner.py", line 46, in __iter__
    yield self._read_next_block()
          ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/dist-packages/pcapng/scanner.py", line 51, in _read_next_block
    block_type = self._read_int(32, False)
  File "/usr/local/lib/python3.13/dist-packages/pcapng/scanner.py", line 112, in _read_int
    return read_int(self.stream, size, signed=signed, endianness=self.endianness)
  File "/usr/local/lib/python3.13/dist-packages/pcapng/structs.py", line 102, in read_int
    data = read_bytes(stream, size_bytes)
  File "/usr/local/lib/python3.13/dist-packages/pcapng/structs.py", line 224, in read_bytes
    data = stream.read(size)
  File "<frozen codecs>", line 325, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 4: invalid continuation byte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions