This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: csv.Sniffer guesses wrong when unquoted fields contain quotes
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Redoute, r.david.murray
Priority: normal Keywords:

Created on 2016-06-12 16:20 by Redoute, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
humptydumpty.py Redoute, 2016-06-12 16:20 example
Messages (2)
msg268391 - (view) Author: Redoute (Redoute) Date: 2016-06-12 16:20
When delimited text fields are not quoted, but embedded text contains some quoted words, sniff() will guess the wrong delimiter. The attached script contains a simple tab-delimited text where sniff() detects space as delimiter.
msg268831 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-06-18 20:00
Sniff is a heuristic.  If you can suggest a way to improve the heuristic, great.  A particular failed guess isn't really a bug, though.
History
Date User Action Args
2022-04-11 14:58:32adminsetgithub: 71489
2022-01-20 23:17:25iritkatrielsetstatus: open -> closed
resolution: not a bug
stage: resolved
2016-06-18 20:00:27r.david.murraysetnosy: + r.david.murray
messages: + msg268831
2016-06-12 16:20:32Redoutecreate