Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode crash on exporting to CSV #210

Closed
ghost opened this issue Jun 22, 2013 · 4 comments
Closed

Unicode crash on exporting to CSV #210

ghost opened this issue Jun 22, 2013 · 4 comments
Labels
bug Bug reports.

Comments

@ghost
Copy link

ghost 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
@ghost
Copy link
Author

ghost 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...

@ghost
Copy link
Author

ghost 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.

@ghost ghost self-assigned this Nov 23, 2013
@ghost
Copy link
Author

ghost commented Nov 23, 2013

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

@ghost
Copy link
Author

ghost commented Nov 23, 2013

Oh well, it's more complicated than that after all...

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports.
Projects
None yet
Development

No branches or pull requests

0 participants