hassio-addons / addon-motioneye

motionEye - Home Assistant Community Add-ons
https://addons.community
MIT License
267 stars 43 forks source link

error 500 after language change to Czech #431

Closed PetrMa closed 1 year ago

PetrMa commented 1 year ago

Problem/Motivation

Add-on version: 0.19.1 Home Assistant 2023.6.0 add-on crashed after change interface language to Czech. Other languages are without any issue

Expected behavior

(What you expected to happen)

Actual behavior

After I change interface language and click Apply, I´ve got this error in interface {"error": "internal server error"}

In the add-on log there are these details: ERROR: unsupported format character 'm' (0x6d) at index 243 Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/tornado/web.py", line 1767, in _execute result = method(*self.path_args, self.path_kwargs) File "/usr/lib/python3.10/site-packages/motioneye/handlers/main.py", line 37, in get self.render( File "/usr/lib/python3.10/site-packages/motioneye/handlers/base.py", line 93, in render content = template.render(template_name, context) File "/usr/lib/python3.10/site-packages/motioneye/template.py", line 83, in render return template.render(**context) File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "/usr/lib/python3.10/site-packages/motioneye/templates/main.html", line 47, in top-level template code

{% if config.get('description') %}?{% endif %}

File "/usr/lib/python3.10/site-packages/motioneye/templates/base.html", line 27, in top-level template code {% block body %}{% endblock %} File "/usr/lib/python3.10/site-packages/motioneye/templates/main.html", line 595, in block 'body'

?

File "/usr/lib/python3.10/site-packages/jinja2/ext.py", line 167, in _gettext_alias return context.call(context.resolve("gettext"), *args, **kwargs) File "/usr/lib/python3.10/site-packages/jinja2/ext.py", line 179, in gettext return rv % variables # type: ignore File "/usr/lib/python3.10/site-packages/markupsafe/init.py", line 115, in mod return self.class(super().mod(arg)) ValueError: unsupported format character 'm' (0x6d) at index 243 ERROR: 500 GET / (127.0.0.1) 42.64ms

Steps to reproduce

Change interface language and click to Apply

Proposed changes

(If you have a proposed change, workaround or fix, describe the rationale behind it)

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!