Skip to content

AttributeError: 'LinUnconditionalFrame' object has no attribute 'signals' #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
E-genin opened this issue Aug 21, 2023 · 2 comments · May be fixed by #123
Open

AttributeError: 'LinUnconditionalFrame' object has no attribute 'signals' #121

E-genin opened this issue Aug 21, 2023 · 2 comments · May be fixed by #123
Labels
bug Something isn't working

Comments

@E-genin
Copy link

E-genin commented Aug 21, 2023

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]
"""

@E-genin E-genin added the bug Something isn't working label Aug 21, 2023
@c4deszes
Copy link
Owner

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.

@E-genin
Copy link
Author

E-genin commented Aug 21, 2023

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.

Oh thanks @c4deszes for the help 👍

@c4deszes c4deszes linked a pull request Oct 8, 2023 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants