I want to convert a blf-file (containing CAN-data) to a mdf (not mf4). I'm able to decode the CAN-frames using the corresponding dbc-files, the messages are stored in a list and then converted into a pandas dataframe.
I create an empty MDF-object from asammdf, append the dataframe and try to save it. But I run into an error.
mdf=MDF()
mdf=mdf.convert(version='3.00')
mdf.append(df)
mdf.save('test.mdf')
gp.channels = gp_channels = []
AttributeError: 'dict' object has no attribute 'channels'
The error comes from line 2097 in mdf_v3.py (source file to asammdf library). However, if I do not convert the version to 3.00, and keep the default 4.10. Then there is no error, and the conversion happens without any error.
Appreciate some help, anybody know how I can use asammdf to create a mdf3-file from a dataframe?