Skip to content
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

Error with yaml wildcard parsing - invalid continuation byte #240

Closed
Nyashers opened this issue Sep 17, 2023 · 4 comments
Closed

Error with yaml wildcard parsing - invalid continuation byte #240

Nyashers opened this issue Sep 17, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Nyashers
Copy link

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

@DominikDoom
Copy link
Owner

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.

@DominikDoom DominikDoom changed the title Not working 1.6.0 Error with yaml wildcard parsing - invalid continuation byte Sep 17, 2023
@DominikDoom DominikDoom added the bug Something isn't working label Sep 17, 2023
DominikDoom added a commit that referenced this issue Sep 17, 2023
@DominikDoom
Copy link
Owner

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.

@Nyashers
Copy link
Author

I noticed a mistake. It consisted in unnecessary files.

@Nyashers
Copy link
Author

Thanks! Its working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants