Skip to content

[Bug]: sds-convert does not properly handle different value types #271

Description

@MiloradCvjetkovic

Is there an existing issue for this?

  • I have searched the existing issues

Problem statement

If an SDS record contains different value types then sds-convert fails with message like below:

sds-convert simple_csv -i ML_Out.0.sds -o ML_Out.0.csv -y ML_Out.sds.yml
Traceback (most recent call last):
  File "D:\Repositories\GitHub\Arm-Examples\SDS-Examples\Alif\AppKit-E7_USB\algorithm\SDS Recordings\sds-convert.py", line 837, in <module>
    main()
    ~~~~^^
  File "D:\Repositories\GitHub\Arm-Examples\SDS-Examples\Alif\AppKit-E7_USB\algorithm\SDS Recordings\sds-convert.py", line 799, in main
    write_SDS_SimpleCSV(args, data[sensor_name[0]], meta_data[sensor_name[0]])
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Repositories\GitHub\Arm-Examples\SDS-Examples\Alif\AppKit-E7_USB\algorithm\SDS Recordings\sds-convert.py", line 287, in write_SDS_SimpleCSV
    tmp_record_row = [record_row[i][sample_idx] for i in range(len(record_row))]
                      ~~~~~~~~~~~~~^^^^^^^^^^^^
IndexError: list index out of range

Steps To Reproduce

Use the files in the repository and run:

sds-convert simple_csv -i ML_Out.0.sds -o ML_Out.0.csv -y ML_Out.sds.yml

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status
Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions