Skip to content

csv module sometimes raises _csv.Error #42061

Closed

Description

@hypatia
mannequin
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 = []

Activity

  1. hypatia commented on Jun 8, 2005

    hypatiamannequin
    MannequinAuthor

    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
  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Jun 8, 2005
  3. smontanaro commented on Jun 8, 2005

    @smontanaro
    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.

  4. transferred this issue fromon Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directory

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions