address = int(record[4:4+width], 16)
data = binascii.unhexlify(record[4 + width:4 + 2 * size - 2]) # Throws Exception: 'str' does not support the buffer interface
actual_crc = int(record[4 + 2 * size - 2:], 16)
The docs (Python 3.x) of binascii describes the behavior:
"a2b_* functions accept Unicode strings containing only ASCII characters. Other functions only accept bytes-like objects (such as bytes, bytearray and other objects that support the buffer protocol)."
It is not possible to load a srec file with python 3.2.1:
The Problem:
The docs (Python 3.x) of binascii describes the behavior: "a2b_* functions accept Unicode strings containing only ASCII characters. Other functions only accept bytes-like objects (such as bytes, bytearray and other objects that support the buffer protocol)."