Closed
Description
The next statement in the iter function of the class CSVReader is not inside the for loop. There for a Stopiteration error is not catched.
Rewriting the code like this fixes this:
def __iter__(self):
for (index, line) in enumerate(self.file):
if index > 0:
timestamp, arbitration_id, extended, remote, error, dlc, data = line.split(',')
yield Message(
timestamp=float(timestamp),
is_remote_frame=(remote == '1'),
is_extended_id=(extended == '1'),
is_error_frame=(error == '1'),
arbitration_id=int(arbitration_id, base=16),
dlc=int(dlc),
data=b64decode(data),
)
self.stop()