Skip to content

Allow Sinter to read CSV fields larger than 128 KiB #962

@mg551-duke

Description

@mg551-duke

csv.field_size_limit() is not raised in sinter/_data/_existing_data.py, so reading a CSV with a large custom_counts field triggers

_csv.Error: field larger than field limit (131072)
Adding one line at import time would fix it:

import sys, csv
csv.field_size_limit(sys.maxsize)

(With a small try/except OverflowError loop for 32-bit builds.)
Let me know and I can open a PR with this two-line patch.

Credit: https://github.com/Zihan-Chen-PhMA/Cultiv_T_RP2/blob/main/installation_guide.md

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