Skip to content

Attribution Error: 'can_decoder' has no attribute 'load_dbc' #11

@raza-sohaib

Description

@raza-sohaib

I have been using this code from the documentation to decode my MF4 files but for the past few days, the code has stopped working. Following is the code:

import can_decoder
import mdf_iter

mdf_path = "00000001.MF4"
dbc_path = "j1939.dbc"

db = can_decoder.load_dbc(dbc_path)
df_decoder = can_decoder.DataFrameDecoder(db)

with open(mdf_path, "rb") as handle:
mdf_file = mdf_iter.MdfFile(handle)
df_raw = mdf_file.get_data_frame()

df_phys = df_decoder.decode_frame(df_raw)
print(df_phys)

Now its showing error as follows:
Attribution Error: 'can_decoder' has no attribute 'load_dbc'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions