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

load dbc error #827

Open
zhaoxian1989 opened this issue Dec 27, 2024 · 0 comments
Open

load dbc error #827

zhaoxian1989 opened this issue Dec 27, 2024 · 0 comments

Comments

@zhaoxian1989
Copy link

code

This line was originally intended to import the content of the ECU. However, because it is a query during the import process and no instance is created, the query result return None, which leads to an error.
I would suggest changing it to look like below:

ecu=db.ecu_by_name(
                        temp.group(2))
                    if not ecu:
                        ecu=canmatrix.Ecu(temp.group(2))
                        db.add_ecu(ecu)
                    ecu.add_attribute(
                        temp.group(1),
                        temp.group(3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants