evidens / json2csv

Converts JSON files to CSV (pulling data from nested structures). Useful for Mongo data
MIT License
262 stars 98 forks source link

UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 0: ordinal not in range(128) #27

Closed putrasurya closed 8 years ago

putrasurya commented 8 years ago

Traceback (most recent call last): File "json2csv.py", line 155, in loader.write_csv(filename=outfile, make_strings=args.strings) File "json2csv.py", line 105, in write_csv writer.writerows(out) File "/usr/lib/python2.7/csv.py", line 158, in writerows return self.writer.writerows(rows) UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 0: ordinal not in range(128)

evidens commented 8 years ago

You need to install the unicodecsv package. That's what you're installing with pip as directed in the README. 


From: putra surya herlambang notifications@github.com Sent: Monday, July 25, 2016 09:12 Subject: [evidens/json2csv] UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 0: ordinal not in range(128) (#27) To: evidens/json2csv json2csv@noreply.github.com

Traceback (most recent call last): File "json2csv.py", line 155, in loader.write_csv(filename=outfile, make_strings=args.strings) File "json2csv.py", line 105, in write_csv writer.writerows(out) File "/usr/lib/python2.7/csv.py", line 158, in writerows return self.writer.writerows(rows) UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 0: ordinal not in range(128)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

putrasurya commented 8 years ago

thank you! it's worked :)