今天在创建新的自动化的时候提示Response error: 500,因为很少新建自动化,所以也不确定是不是今天的版本升级造成的。系统版本为[color=var(--primary-text-color)]Home Assistant 2022.11.1 Supervisor 2022.10.2Operating System 9.3 。查询日志如下
Logger: aiohttp.server
Source: util/file.py:40
First occurred: 21:34:09 (1 occurrences)
Last logged: 21:34:09
Error handling requestTraceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/__init__.py", line 147, in post await hass.async_add_executor_job(_write, path, current) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/config/__init__.py", line 243, in _write write_utf8_file_atomic(path, contents) File "/usr/src/homeassistant/homeassistant/util/file.py", line 40, in write_utf8_file_atomic fdesc.write(utf8_data)UnicodeEncodeError: 'ascii' codec can't encode characters in position 31-32: ordinal not in range(128)
在这里请教各位大佬的帮助,非常感谢!
第二条日志
Logger: homeassistant
Source: util/file.py:40
First occurred: 21:36:16 (1 occurrences)
Last logged: 21:36:16
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 253, in _async_callback_delayed_write
await self._async_handle_write_data()
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 278, in _async_handle_write_data
await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 289, in _write_data
json_util.save_json(
File "/usr/src/homeassistant/homeassistant/util/json.py", line 92, in save_json
write_utf8_file_atomic(filename, json_data, private)
File "/usr/src/homeassistant/homeassistant/util/file.py", line 40, in write_utf8_file_atomic
fdesc.write(utf8_data)
UnicodeEncodeError: 'ascii' codec can't encode character '\u738b' in position 543: ordinal not in range(128)
louis_lee 发表于 2022-11-5 21:58
'ascii' codec can't encode character '%u738b' in position 543: ordinal not in range(128)
'%u738b'就 ...
如果我的记忆没错的话,我的账户名一直都是”wang“而并非”王“,因为我在我保存密码的工具中显示我一直使用的用户名都是”wang“。 但我刚才去看的时候,发现用户名确实是”王“,我也不确定是否是我自己更改的。我将用户名重新改为”wang“并重启后,依旧提示相同的错误。错误日志如下:
Logger: aiohttp.server
Source: util/file.py:40
First occurred: 22:23:21 (1 occurrences)
Last logged: 22:23:21
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/__init__.py", line 147, in post
await hass.async_add_executor_job(_write, path, current)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/config/__init__.py", line 243, in _write
write_utf8_file_atomic(path, contents)
File "/usr/src/homeassistant/homeassistant/util/file.py", line 40, in write_utf8_file_atomic
fdesc.write(utf8_data)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 31-32: ordinal not in range(128)