Lektor gives error if page content has symbols like § or ü
If my page has content with symbols like § or ü, it breaks lektor server and I can't save the page.
Log
UnicodeEncodeError
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa7' in position 197: ordinal not in range(128) Traceback (most recent call last)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/flask/app.py", line 2328, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/flask/app.py", line 2314, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/flask/app.py", line 1760, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/lektor/lib/python2.7/site-packages/flask/app.py", line 1834, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/flask/app.py", line 1737, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/lektor/lib/python2.7/site-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/lektor/admin/modules/serve.py", line 151, in serve_artifact
return serve_up_artifact(path)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/lektor/admin/modules/serve.py", line 130, in serve_up_artifact
artifact_name, filename = li.resolve_artifact('/' + path, pad)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/lektor/admin/webui.py", line 62, in resolve_artifact
prog, _ = builder.build(source)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/lektor/builder.py", line 1110, in build
source=source, prog=prog)
File "/usr/local/lib/lektor/lib/python2.7/site-packages/lektor/pluginsystem.py", line 161, in emit
rv[plugin.id] = handler(**kwargs)
File "/home/user/communitytpo/lego/packages/i18n/lektor_i18n.py", line 357, in on_before_build
translator))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa7' in position 197: ordinal not in range(128)
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.
You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:
dump() shows all variables in the frame
dump(obj) dumps all that's known about the object