Closed steve-estes closed 1 year ago
The linked issue is unrelated. (Sniffing is deterministic, so intermittent failures have another cause.)
In this case, it's known that sniffing can be wrong. From Python's docs:
This method is a rough heuristic and may produce both false positives and negatives.
The solution is to either skip sniffing (-y 0
) or sniff the entire file (-y -1
).
To be clear, this warning is raised even when sniffing the entire file. I reduced my original input file to the smallest file I could and still have it exhibit the behavior, but it doesn't matter how much you sniff, unless it's smaller than this amount.
Yes - in some circumstances, Python's sniffer is always wrong.
I have a very small (~1 kb) test file, 4 columns with 9 data rows, chopped down to minimal size, which yields a weird Agate sniffer error when doing a normal
csvsort
operation. The file is attached --> csvkit-error-poc-3.csv <-- and contains nothing sensitive, but in its entirety is:And I get this error just sorting by anything:
Notes: