Skip to content

load dbc error #827

Description

@zhaoxian1989

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))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions