Skip to content

In --json output, include "hed string" and point to multiple rows when applicable to HED error #175

Open
@yarikoptic

Description

@yarikoptic

I am not sure if

covers this since I find no "hed string" which I observe in txt output downloaded from running HED validation on https://hedtools.org/hed/events

Issues in row 2:
    hed string: (Duration/2.03427314758301, (Label/Entire-event-time)), (Task-stimulus-role/Cue, Action/Perform/Read), Organizational-property/Task/tomspunt,(Duration/0.3, (Label/Entire-event-time)), (Task-stimulus-role/Cue, Action/Perform/Read), Organizational-property/Task/tomspunt
        TAG_EXPRESSION_REPEATED: Repeated tag - "Organizational-property/Task/tomspunt"  Problem spans string indexes: 231, 268
        TAG_EXPRESSION_REPEATED: Repeated group - "(Cue,Read)"

which is due to a bug in _events.tsv which has "duplicate" rows

Image

--json output of bids-validator (2.0.3-4-g63e17217 or somewhere right before since I just reran with --reload) has only

      {
        "code": "HED_ERROR",
        "subCode": "TAG_EXPRESSION_REPEATED",
        "location": "/sub-0001/ses-04/func/sub-0001_ses-04_task-fractional_acq-mb8_run-02_events.tsv",
        "issueMessage": "ERROR: [TAG_EXPRESSION_REPEATED] Duplicate tag - \"(Task-stimulus-role/Cue, Action/Perform/Read)\". TSV line: 2, 3. (For more information on this HED error, see https://hed-specification.readthedocs.io/en/latest/Appendix_B.html#tag-expression-repeated.)",
        "severity": "error"
      },

which makes it hard to impossible to identify the reason for this error. It was the "hed string" which was very informative in this case

@VisLab note that the error is actually due to records from multiple rows, but validator output points to a single row. Ideally -- should be somewhere saying that it was a composition of multiple rows. And then bids-validator should channel that information too to the user.

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