[GH-ISSUE #240] Error with yaml wildcard parsing - invalid continuation byte #171

Closed
opened 2026-10-30 21:20:27 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @Nyashers on GitHub (Sep 17, 2023).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/240

Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
*** Error loading script: tag_autocomplete_helper.py
Traceback (most recent call last):
File "C:\Program Files\Stable Diffusion\StableDiff\modules\scripts.py", line 382, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\Program Files\Stable Diffusion\StableDiff\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Program Files\Stable Diffusion\StableDiff\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 335, in
write_temp_files()
File "C:\Program Files\Stable Diffusion\StableDiff\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 307, in write_temp_files
get_yaml_wildcards()
File "C:\Program Files\Stable Diffusion\StableDiff\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 91, in get_yaml_wildcards
data = yaml.safe_load(file)
File "C:\Program Files\Stable Diffusion\StableDiff\venv\lib\site-packages\yaml_init
.py", line 125, in safe_load
return load(stream, SafeLoader)
File "C:\Program Files\Stable Diffusion\StableDiff\venv\lib\site-packages\yaml_init_.py", line 79, in load
loader = Loader(stream)
File "C:\Program Files\Stable Diffusion\StableDiff\venv\lib\site-packages\yaml\loader.py", line 34, in init
Reader.init(self, stream)
File "C:\Program Files\Stable Diffusion\StableDiff\venv\lib\site-packages\yaml\reader.py", line 85, in init
self.determine_encoding()
File "C:\Program Files\Stable Diffusion\StableDiff\venv\lib\site-packages\yaml\reader.py", line 124, in determine_encoding
self.update_raw()
File "C:\Program Files\Stable Diffusion\StableDiff\venv\lib\site-packages\yaml\reader.py", line 178, in update_raw
data = self.stream.read(size)
File "C:\Program Files\Stable Diffusion\StableDiff\python\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc7 in position 37: invalid continuation byte

Originally created by @Nyashers on GitHub (Sep 17, 2023). Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/240 Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu. *** Error loading script: tag_autocomplete_helper.py Traceback (most recent call last): File "C:\Program Files\Stable Diffusion\StableDiff\modules\scripts.py", line 382, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "C:\Program Files\Stable Diffusion\StableDiff\modules\script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "C:\Program Files\Stable Diffusion\StableDiff\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 335, in <module> write_temp_files() File "C:\Program Files\Stable Diffusion\StableDiff\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 307, in write_temp_files get_yaml_wildcards() File "C:\Program Files\Stable Diffusion\StableDiff\extensions\a1111-sd-webui-tagcomplete\scripts\tag_autocomplete_helper.py", line 91, in get_yaml_wildcards data = yaml.safe_load(file) File "C:\Program Files\Stable Diffusion\StableDiff\venv\lib\site-packages\yaml\__init__.py", line 125, in safe_load return load(stream, SafeLoader) File "C:\Program Files\Stable Diffusion\StableDiff\venv\lib\site-packages\yaml\__init__.py", line 79, in load loader = Loader(stream) File "C:\Program Files\Stable Diffusion\StableDiff\venv\lib\site-packages\yaml\loader.py", line 34, in __init__ Reader.__init__(self, stream) File "C:\Program Files\Stable Diffusion\StableDiff\venv\lib\site-packages\yaml\reader.py", line 85, in __init__ self.determine_encoding() File "C:\Program Files\Stable Diffusion\StableDiff\venv\lib\site-packages\yaml\reader.py", line 124, in determine_encoding self.update_raw() File "C:\Program Files\Stable Diffusion\StableDiff\venv\lib\site-packages\yaml\reader.py", line 178, in update_raw data = self.stream.read(size) File "C:\Program Files\Stable Diffusion\StableDiff\python\lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc7 in position 37: invalid continuation byte
bsakaguchi 2026-10-30 21:20:27 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@DominikDoom commented on GitHub (Sep 17, 2023):

This has nothing to do with the webui version, but means a yaml wildcard file failed to load due to illegal characters. It shouldn't happen on a proper file since the file load already specifies the correct encoding, so that means the file is likely corrupted in some way.
It sound really similar to this issue: #224

Actually the exact same character position, so it's probably the same offending file.

The user there said it was the following file:

I do have some *.yaml files in my sd-dynamic-prompts folder.
and just before posting this, I stopped and remembered that I was having an issue/ error with a *.yaml file ( was told by creator not to worry about it and ignore it.). so I took care of that by removing affected lines, and restarted SD and all looks good now.
ohh and the affected file was WC-SDVN\2000Wildcards\presets.yaml for any one else having this issue. look at line's 126 -136

But when I downloaded it myself, it didn't happen for me, so maybe it was already fixed by the author at that time.
I'd suggest re-downloading that wildcard pack to get the current version and else trying the advice the other user said.

<!-- gh-comment-id:1722476823 --> @DominikDoom commented on GitHub (Sep 17, 2023): This has nothing to do with the webui version, but means a yaml wildcard file failed to load due to illegal characters. It shouldn't happen on a proper file since the file load already specifies the correct encoding, so that means the file is likely corrupted in some way. It sound really similar to this issue: #224 Actually the exact same character position, so it's probably the same offending file. The user there said it was the following file: >I do have some *.yaml files in my sd-dynamic-prompts folder. and just before posting this, I stopped and remembered that I was having an issue/ error with a *.yaml file ( was told by creator not to worry about it and ignore it.). so I took care of that by removing affected lines, and restarted SD and all looks good now. ohh and the affected file was WC-SDVN\2000Wildcards\presets.yaml for any one else having this issue. look at line's 126 -136 But when I downloaded it myself, it didn't happen for me, so maybe it was already fixed by the author at that time. I'd suggest re-downloading that wildcard pack to get the current version and else trying the advice the other user said.
Author
Owner

@DominikDoom commented on GitHub (Sep 17, 2023):

I have added another safety catch that will prevent the rest of the extension from breaking if this happens, but this doesn't resolve the core issue with the file itself. There's nothing I can do about that from my side, so this file will be missing from wildcard completion if you don't fix or replace it.

<!-- gh-comment-id:1722478020 --> @DominikDoom commented on GitHub (Sep 17, 2023): I have added another safety catch that will prevent the rest of the extension from breaking if this happens, but this doesn't resolve the core issue with the file itself. There's nothing I can do about that from my side, so this file will be missing from wildcard completion if you don't fix or replace it.
Author
Owner

@Nyashers commented on GitHub (Sep 17, 2023):

I noticed a mistake. It consisted in unnecessary files.

<!-- gh-comment-id:1722478676 --> @Nyashers commented on GitHub (Sep 17, 2023): I noticed a mistake. It consisted in unnecessary files.
Author
Owner

@Nyashers commented on GitHub (Sep 17, 2023):

Thanks! Its working!

<!-- gh-comment-id:1722480071 --> @Nyashers commented on GitHub (Sep 17, 2023): Thanks! Its working!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DominikDoom/a1111-sd-webui-tagcomplete#171
No description provided.