Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

csv module sometimes raises _csv.Error #42061

Closed
hypatia mannequin opened this issue Jun 8, 2005 · 2 comments
Closed

csv module sometimes raises _csv.Error #42061

hypatia mannequin opened this issue Jun 8, 2005 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@hypatia
Copy link
Mannequin

hypatia mannequin commented Jun 8, 2005

BPO 1216831
Nosy @smontanaro

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2005-06-08.02:52:57.000>
created_at = <Date 2005-06-08.02:42:38.000>
labels = ['invalid', 'library']
title = 'csv module sometimes raises _csv.Error'
updated_at = <Date 2005-06-08.02:52:57.000>
user = 'https://bugs.python.org/hypatia'

bugs.python.org fields:

activity = <Date 2005-06-08.02:52:57.000>
actor = 'skip.montanaro'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2005-06-08.02:42:38.000>
creator = 'hypatia'
dependencies = []
files = []
hgrepos = []
issue_num = 1216831
keywords = []
message_count = 2.0
messages = ['25509', '25510']
nosy_count = 2.0
nosy_names = ['skip.montanaro', 'hypatia']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1216831'
versions = []

@hypatia
Copy link
Mannequin Author

hypatia mannequin commented Jun 8, 2005

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

@hypatia hypatia mannequin closed this as completed Jun 8, 2005
@hypatia hypatia mannequin added invalid stdlib Python modules in the Lib dir labels Jun 8, 2005
@smontanaro
Copy link
Contributor

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.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

1 participant