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 module sometimes raises _csv.Error
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: hypatia, skip.montanaro
Priority: normal Keywords:

Created on 2005-06-08 02:42 by hypatia, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg25509 - (view) Author: Mary Gardiner (hypatia) Date: 2005-06-08 02:42
Tested on 2.3 (Fedora Core 3) and 2.4 (Ubuntu 5.04).
The documentation strongly suggests that the csv module
raises csv.Error when there are problems parsing the
csv, but in fact it sometimes lets _csv.Error escape
the C module, as per this example:

>>> import csv, StringIO
>>> r = csv.reader(StringIO.StringIO('"xx,qq'))
>>> r.next()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
_csv.Error: newline inside string
msg25510 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2005-06-08 02:52
Logged In: YES 
user_id=44345

csv.Error and _csv.Error are the same object.  The object is
defined in the low level _csv module, then imported into the
csv module.  That the name is "_csv.Error" can't be changed
in the context of the csv module.
History
Date User Action Args
2022-04-11 14:56:11adminsetgithub: 42061
2005-06-08 02:42:38hypatiacreate