Skip to content
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

No Valid Measurements Found in A2L File #60

Open
PCT-VF opened this issue Dec 2, 2024 · 1 comment
Open

No Valid Measurements Found in A2L File #60

PCT-VF opened this issue Dec 2, 2024 · 1 comment

Comments

@PCT-VF
Copy link

PCT-VF commented Dec 2, 2024

Description
I am using the example A2L file provided in this repository:
example-a2l-file.a2l

When I parse the file using the following code, no MEASUREMENT entries are detected.

Code Snippet

from pya2l import DB
from pya2l import model

db = DB()
session = db.open_create("ASAP2_Demo_V161")
measurements = session.query(model.Measurement).order_by(model.Measurement.name).all()
for m in measurements:
    print("{:48} {:12} 0x{:08x}".format(m.name, m.datatype, m.ecu_address.address))
# print(dir(m))
ifd = model.IfData()
print(ifd)
print(dir(ifd))

if not measurements:
    print("No valid measurements found in A2L file.")
    exit(1) 

Output

IfData(sl = None, sc = None, el = None, ec = None, raw = None, parsed = None, rid = None)
['__abstract__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', ...]
No valid measurements found in A2L file.

Environment

Python 3.12
pyA2L (latest version from pip)
OS: Windows 11

Am I missing a step, or is there an issue with how pya2l processes the provided example file? Any guidance would be appreciated!

Thank you!

@christoph2
Copy link
Owner

Did you fork the project and than run the build procedure pip install -e . ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants