CSS-Electronics / api-examples

CANedge API Examples for MDF4/S3
MIT License
103 stars 35 forks source link

KeyError: 'HDComment.Device Information.serial number #21

Closed hurbx closed 1 year ago

hurbx commented 1 year ago

hi Martin

I followed the instructions you mentioned last time, but now I get this error, which I don't understand why it happens, I'm using the downloaded project with the sample files

`Found a total of 2 log files Traceback (most recent call last): File "C:\Users\hugoa\OneDrive\Escritorio\api-examples-1.1.0\examples\data-processing\process_data.py", line 31, in df_raw, device_id = proc.get_raw_data(log_file, passwords=pw) File "C:\Users\hugoa\OneDrive\Escritorio\api-examples-1.1.0\examples\data-processing\utils.py", line 221, in get_raw_data device_id = self.get_device_id(mdf_file) File "C:\Users\hugoa\OneDrive\Escritorio\api-examples-1.1.0\examples\data-processing\utils.py", line 234, in get_device_id return mdf_file.get_metadata()["HDComment.Device Information.serial number"]["value_raw"] KeyError: 'HDComment.Device Information.serial number'

Process finished with exit code 1 `

hurbx commented 1 year ago

im using Python 3.9.13

MatinF commented 1 year ago

You need to update to use the latest repo files incl. latest utils.py file