Unicode crash on exporting to CSV #210

Closed
hsoft opened this Issue Jun 22, 2013 · 4 comments

Projects

None yet

1 participant

@hsoft
Owner
hsoft commented Jun 22, 2013
Application Name: dupeGuru
Version: 3.6.0

Traceback (most recent call last):
File "/usr/share/dupeguru_se/core/app.py", line 383, in export_to_csv
export.export_to_csv(dest_file, colnames, rows)
File "/usr/share/dupeguru_se/core/export.py", line 149, in export_to_csv
writer.writerow(row)
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcfc' in
position 9: surrogates not allowed
@hsoft
Owner
hsoft commented Jun 22, 2013

Surrogates again... I had a similar problem with #170, but xml.etree fixed it by itself. I should probably just remove these characters from exported paths, or something like that...

@hsoft
Owner
hsoft commented Nov 23, 2013

So yeah, I can reproduce the issue by manually (through a python os.rename()) creating a buggy filename, scanning them and then trying to export the CSV. As with #170, I should just clean those buggy characters out.

@hsoft hsoft was assigned Nov 23, 2013
@hsoft
Owner
hsoft commented Nov 23, 2013

... or, just use errors='replace' during the encoding phase...

@hsoft hsoft closed this in 42be49d Nov 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment