weblate
weblate copied to clipboard
UnicodeDecodeError
Hi,
after saving translation with some non-unicode characters, this stacktrace is presented:
ERROR Internal Server Error: /translate/annie/app/nb/
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 149, in get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/share/weblate/weblate/trans/views/edit.py", line 522, in translate
this_unit_url, next_unit_url
File "/usr/share/weblate/weblate/trans/views/edit.py", line 282, in handle_translate
translation.check_sync()
File "/usr/share/weblate/weblate/trans/models/translation.py", line 515, in check_sync
repr(newunit.source)
File "/usr/share/weblate/weblate/trans/mixins.py", line 153, in log_error
self.log_prefix + msg, *args
File "/usr/lib64/python2.7/logging/__init__.py", line 1175, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/lib64/python2.7/logging/__init__.py", line 1268, in _log
self.handle(record)
File "/usr/lib64/python2.7/logging/__init__.py", line 1278, in handle
self.callHandlers(record)
File "/usr/lib64/python2.7/logging/__init__.py", line 1318, in callHandlers
hdlr.handle(record)
File "/usr/lib64/python2.7/logging/__init__.py", line 749, in handle
self.emit(record)
File "/usr/lib64/python2.7/logging/handlers.py", line 843, in emit
msg = self.format(record) + '\000'
File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format
return fmt.format(record)
File "/usr/lib64/python2.7/logging/__init__.py", line 467, in format
s = self._fmt % record.__dict__
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 103: ordinal not in range(128)
Could be this resolved by changing our setup or is it an issue with weblate?
Thanks !
I hope I've fixed it now, it would be great if you could test that.