Skip to content

fix sniff() argument#4

Open
ABruihler wants to merge 3 commits intoInvariantTech:mainfrom
dartmouth:fix-sniff
Open

fix sniff() argument#4
ABruihler wants to merge 3 commits intoInvariantTech:mainfrom
dartmouth:fix-sniff

Conversation

@ABruihler
Copy link
Contributor

On my end, the sample provided to sniff() was not enough to correctly determine the dialect. I found I had to raise it significantly to get it to work as expected. Not sure if this is something just on my end or not.

@jtwb
Copy link
Contributor

jtwb commented Feb 12, 2026

I'm debating whether it might be best to drop the sniffer entirely as the current IANA file is readable with the default csv.reader. Thoughts?

-    dialect = csv.Sniffer().sniff(web_csv[0:1024])
-    reader = csv.reader(StringIO(web_csv), dialect=dialect)
+    reader = csv.reader(StringIO(web_csv))

@ABruihler
Copy link
Contributor Author

That makes sense and works for me too.

@ABruihler ABruihler changed the title fix sniff() argument so it correctly determines the dialect fix sniff() argument Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants