-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnicodeDecodeError #54
Comments
Same thing here. Any way to resolve?
|
An error occurs when the annotation is utf8. The utf8 annotation has been deleted and normalized. |
What exactly is the annotation? |
You had to comment all .yaml files in English only. All yaml files in the subdirectory, including files in the config folder. |
Any other language should work fine for comments, not just English. The important condition is to explicitly save file with UTF-8 encoding in your text editor. I've added a yaml file with UTF-8 comments to the automated tests, it works just fine with current version (0.6.0) On top of that, starting from 0.6.1 (not yet released) files with encodings other than UTF-8 will not cause Watchman to crash, it will report error message to the log instead. |
Hello.
Thank you for your kindness.
The following error occurs:
Logger: homeassistant.config_entries
Source: custom_components/watchman/utils.py:255
Integration: Watchman (documentation, issues)
First occurred: 11:19:42 (1 occurrences)
Last logged: 11:19:42
Error setting up entry Watchman for watchman
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 339, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/watchman/init.py", line 137, in async_setup_entry
parse_config(hass, reason="changes in watchman configuration")
File "/config/custom_components/watchman/init.py", line 345, in parse_config
entity_list, service_list, files_parsed, files_ignored = parse(
File "/config/custom_components/watchman/utils.py", line 255, in parse
for i, line in enumerate(open(yaml_file, encoding="utf-8")):
File "/usr/local/lib/python3.9/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 32: invalid start byte
The text was updated successfully, but these errors were encountered: