From c9d4a88d2647cd762bfdba1ab5457eef81afebc9 Mon Sep 17 00:00:00 2001 From: danielhrisca Date: Fri, 6 Mar 2020 14:15:17 +0200 Subject: [PATCH] fix error in get_can_signal --- asammdf/blocks/mdf_v4.py | 7 ++++--- asammdf/version.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/asammdf/blocks/mdf_v4.py b/asammdf/blocks/mdf_v4.py index 1fd12f3b4..d047d7d71 100755 --- a/asammdf/blocks/mdf_v4.py +++ b/asammdf/blocks/mdf_v4.py @@ -2132,7 +2132,6 @@ def _validate_channel_selection( try: grp.channels[ch_nr] except IndexError: - print(len(self.groups), len(grp.channels)) raise MdfException(f"Channel index out of range: {(name, group, index)}") else: if name not in self.channels_db: @@ -8470,7 +8469,7 @@ def get_can_signal( index = idx break else: - index = self.can_logging_db[can_id][message.arbitration_id.id] + index = self.can_logging_db[_can_id][message.arbitration_id.id] if index is not None: break @@ -8535,6 +8534,7 @@ def get_can_signal( vals = payload[idx] t = can_ids.timestamps[idx].copy() + if can_ids.invalidation_bits is not None: invalidation_bits = can_ids.invalidation_bits[idx] else: @@ -8546,7 +8546,7 @@ def get_can_signal( if ignore_invalidation_bits: - return Signal( + sig = Signal( samples=vals, timestamps=t, name=name, @@ -8554,6 +8554,7 @@ def get_can_signal( comment=comment, invalidation_bits=invalidation_bits, ) + return sig else: diff --git a/asammdf/version.py b/asammdf/version.py index 90600e6e6..19fb3f903 100644 --- a/asammdf/version.py +++ b/asammdf/version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- """ asammdf version module """ -__version__ = "5.19.0" +__version__ = "5.19.1"