CSV writer fails to handle unicode strings

Bug #1481014 reported by Ivan Chavero (imcsk8)
6
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.

Revision history for this message
Ivan Chavero (imcsk8) (ichavero-ichavero) wrote :

just found that the latest version uses unicodecsv so this bug is fixed.

Revision history for this message
Terry Howe (thowe-g) wrote :

I don't think that has been released yet.

https://review.openstack.org/#/c/205605/

Changed in python-cliff:
status: New → Fix Committed
assignee: nobody → Terry Howe (thowe-g)
Changed in python-cliff:
milestone: none → 1.14.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.