mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-01-26 19:19:57 +00:00
Catch UnicodeDecodeError to prevent corrupted yaml files from breaking the extension
As mentioned in #240
This commit is contained in:
@@ -96,8 +96,8 @@ def get_yaml_wildcards():
|
||||
parse_dynamic_prompt_format(yaml_wildcards, data, path)
|
||||
else:
|
||||
print('No data found in ' + path.name)
|
||||
except yaml.YAMLError:
|
||||
print('Issue in parsing YAML file ' + path.name)
|
||||
except (yaml.YAMLError, UnicodeDecodeError) as e:
|
||||
print(f'Issue in parsing YAML file {path.name}: {e}')
|
||||
continue
|
||||
|
||||
# Sort by count
|
||||
|
||||
Reference in New Issue
Block a user