CSV writer fails to handle unicode strings
Bug #1481014 reported by
Ivan Chavero (imcsk8)
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cliff |
Fix Released
|
Undecided
|
Terry Howe |
Bug Description
When i run:
/usr/bin/openstack project list --quiet --format csv --long
On a database that has unicode format and special characters (accents, etc...) i get this error:
ERROR: openstack 'ascii' codec can't encode character u'\xe1' in position 1: ordinal not in range(128)
I found that the Cliff library uses a csv.writer object to generate the output and the csv module does not handle unicode strings, so it in order to avoid this problem the strings have to be converted to ASCII encoding.
Changed in python-cliff: | |
milestone: | none → 1.14.0 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
just found that the latest version uses unicodecsv so this bug is fixed.