AttributeError: 'LinUnconditionalFrame' object has no attribute 'signals'
I am trying to run the following script on an *.ldf file (including the one in the example folder lin22.ldf) :
import ldfparser
ldf = ldfparser.parse_ldf('lin22.ldf')
for frame in ldf.frames:
print(frame.name)
print(frame.signals)
I get the following error : AttributeError: 'LinUnconditionalFrame' object has no attribute 'signals'
even if the documentation suggests otherwise :
... """ LinUnconditionalFrame represents an unconditional frame consisting of signals :param frame_id: Frame identifier :type frame_id: int :param name: Name of the frame :type name: str :param length: Length of the frame in bytes :type length: int :param signals: Signals of the frame # <===== :type signals: Dict[int, LinSignal] """
This is a mistake in the documentation, that field has been renamed to signal_map. Sadly the project still has no proper docstring based documentation so I wouldn't rely on them
I'll keep this issue open and close it once we have something usable.
This is a mistake in the documentation, that field has been renamed to
signal_map. Sadly the project still has no proper docstring based documentation so I wouldn't rely on themI'll keep this issue open and close it once we have something usable.
Oh thanks @c4deszes for the help 👍