Skip to content

Add more names to SOPN name fields for matching against parsed PDFs #2459

@sentry-io

Description

@sentry-io

If the PDF doesn't have one of the column names we're expecting we get this error. We should broaden the name matching system.

Sentry Issue: YNR-CG

TypeError: sequence item 0: expected str instance, NoneType found
(7 additional frame(s) were not displayed)
...
  File "sopn_parsing/helpers/parse_tables.py", line 425, in parse_raw_data_for_ballot
    parse_raw_data(ballot, reparse=reparse)
  File "sopn_parsing/helpers/parse_tables.py", line 501, in parse_raw_data
    textract_data = parse_dataframe(ballot, textract_model.as_pandas)
  File "sopn_parsing/helpers/parse_tables.py", line 469, in parse_dataframe
    return parse_table(ballot, df)
  File "sopn_parsing/helpers/parse_tables.py", line 372, in parse_table
    name = get_name(row, name_fields)
  File "sopn_parsing/helpers/parse_tables.py", line 333, in get_name
    name = " ".join([row[field] for field in name_fields])

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions