Currentle exported filenames are written by converting last, first and filename - particular filenames with characters outside of ascii range are not able to be encoded. The lines used to avoid this problem are a hack:
try:
file_name = '{!s}-{!s}-{!s}'.format(last, first, attachment.file_name)
except UnicodeEncodeError:
logging.warn('Failed to encode filename for: {!s}'.format(attachment_id))
continue
Currentle exported filenames are written by converting last, first and filename - particular filenames with characters outside of ascii range are not able to be encoded. The lines used to avoid this problem are a hack: