Skip to content

[bids_import.py] Improperly handled n/a value #1281

@jeffersoncasimir

Description

@jeffersoncasimir

Found during v27 testing using unknown iEEG BIDS dataset found on NEMAR.

LowCutoff (and HighCutoff) are DECIMAL(8,3) DEFAULT NULL but a participant that had a value of n/a for low_cutoff in their _channels.tsv triggered an error. This is a valid value and should be allowed and correctly handled BIDS Reference

Error Stack:

  File "/opt/Loris-MRI/bin/mri/python/scripts/bids_import.py", line 638, in <module>
    main()
  File "/opt/Loris-MRI/bin/mri/python/scripts/bids_import.py", line 120, in main
    read_and_insert_bids(
  File "/opt/Loris-MRI/bin/mri/python/scripts/bids_import.py", line 353, in read_and_insert_bids
    Eeg(
  File "/opt/Loris-MRI/bin/mri/python/lib/eeg.py", line 175, in __init__
    self.register_data()
  File "/opt/Loris-MRI/bin/mri/python/lib/eeg.py", line 302, in register_data
    channel_file_path = self.fetch_and_insert_channel_file(
  File "/opt/Loris-MRI/bin/mri/python/lib/eeg.py", line 702, in fetch_and_insert_channel_file
    physiological.insert_channel_file(
  File "/opt/Loris-MRI/bin/mri/python/lib/physiological.py", line 491, in insert_channel_file
    self.db.insert(
  File "/opt/Loris-MRI/bin/mri/python/lib/database.py", line 185, in insert
    raise Exception("Insert query failure: " + format(err))
Exception: Insert query failure: (1366, "Incorrect decimal value: 'n/a' for column `jcasimir_test_27`.`physiological_channel`.`LowCutoff` at row 1")

Metadata

Metadata

Assignees

No one assigned

    Labels

    27.0-bugArea: BIDSIssue or PR related to the handling of BIDS datasetsArea: EEGIssue or PR related to EEG / iEEG processing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions