#2402 embedded carriage returns in a CSV not handled
Closed: Fixed None Opened 12 years ago by rcritten.

I was going to test the problem in BZ https://bugzilla.redhat.com/show_bug.cgi?id=794474 and just cut and pasted the command-line. It ended up pasting as several lines but the double-quotes kept it all together. This was not liked by the CSV parser:

$ ipa config-mod --userobjectclasses="top, person, organizationalperson,
> inetorgperson, inetuser, posixaccount, krbprincipalaux, krbticketpolicyaux,
> ipaobject, ipasshuser, sambasamaccount"
ipa: ERROR: unhandled exception: Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode?
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipalib/backend.py", line 125, in execute
    result = self.Command[_name](*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 427, in __call__
    params = self.normalize(**params)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 578, in normalize
    (k, self.params[k].normalize(v)) for (k, v) in kw.iteritems()
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 578, in <genexpr>
    (k, self.params[k].normalize(v)) for (k, v) in kw.iteritems()
  File "/usr/lib/python2.7/site-packages/ipalib/parameters.py", line 725, in normalize
    newval += tuple(csvreader.next()) #pylint: disable=E1101
  File "/usr/lib/python2.7/site-packages/ipalib/parameters.py", line 690, in __unicode_csv_reader
    for row in csv_reader:
Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode?
ipa: ERROR: an internal error has occurred

Metadata Update from @rcritten:
- Issue assigned to pviktori
- Issue set to the milestone: FreeIPA 2.2 Core Effort - 2012/03

7 years ago

Login to comment on this ticket.

Metadata