Skip to content

"ParserWarning: Length of header or names does not match length of data" #2238

@yarikoptic

Description

@yarikoptic

mkdocs serve has some of such warnings. Am I alone or you see them too @bids-standard/maintainers ???

INFO    -  ParserWarning: Length of header or names does not match length of data. This leads to a loss of
           data with index_col=False.
             File
           "/home/yoh/proj/bids/bids-specification/.venv/lib/python3.11/site-packages/pandas/io/parsers/base_parser.py",
           line 925, in _check_data_length
               warnings.warn(
             File
           "/home/yoh/proj/bids/bids-specification/tools/schemacode/src/bidsschematools/render/tsv.py", line
           31, in
               df = pd.read_csv(
INFO    -  ParserWarning: Length of header or names does not match length of data. This leads to a loss of
           data with index_col=False.
             File
           "/home/yoh/proj/bids/bids-specification/.venv/lib/python3.11/site-packages/pandas/io/parsers/base_parser.py",
           line 925, in _check_data_length
               warnings.warn(
             File
           "/home/yoh/proj/bids/bids-specification/tools/schemacode/src/bidsschematools/render/tsv.py", line
           31, in
               df = pd.read_csv(

those suggest some misformatted TSV and I think we should make them into ERRORs so PRs do not allow for such to appear. WDYT?

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