Non ascii characters in backup cause error 500 when performing diff
Project for backing up network device configuration
Brought to you by:
honyczek
Internal Server Error: /confiback/diff/backup/
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/srv/www/confiback/frontend/views.py", line 63, in diff
_ret += "Backup id=='{}' was not found?\n".format(i)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0148' in position 32: ordinal not in range(128)
There was a character from Czech charset in a configuration backup and when I did diff comparation, it went into error 500.