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

Suddently stopped working, it keeps printing an utf-8 error #38

Open
Redenrik opened this issue Feb 24, 2024 · 1 comment
Open

Suddently stopped working, it keeps printing an utf-8 error #38

Redenrik opened this issue Feb 24, 2024 · 1 comment

Comments

@Redenrik
Copy link

Till yesterday everything worked fine, but today, using the same wildcards and prompts it doesn't works and prints this in the terminal each time i start a generation that includes wildcards in it's prompt:

*** Error running process: D:\Red-AI\stable-diffusion-webui\extensions\stable-diffusion-webui-wildcards\scripts\wildcards.py
    Traceback (most recent call last):
      File "D:\Red-AI\stable-diffusion-webui\modules\scripts.py", line 718, in process
        script.process(p, *script_args)
      File "D:\Red-AI\stable-diffusion-webui\extensions\stable-diffusion-webui-wildcards\scripts\wildcards.py", line 49, in process
        p.all_prompts = self.replace_prompts(p.all_prompts, p.all_seeds)
      File "D:\Red-AI\stable-diffusion-webui\extensions\stable-diffusion-webui-wildcards\scripts\wildcards.py", line 42, in replace_prompts
        res.append("".join(self.replace_wildcard(chunk, gen) for chunk in text.split("__")))
      File "D:\Red-AI\stable-diffusion-webui\extensions\stable-diffusion-webui-wildcards\scripts\wildcards.py", line 42, in <genexpr>
        res.append("".join(self.replace_wildcard(chunk, gen) for chunk in text.split("__")))
      File "D:\Red-AI\stable-diffusion-webui\extensions\stable-diffusion-webui-wildcards\scripts\wildcards.py", line 27, in replace_wildcard
        return gen.choice(f.read().splitlines())
      File "C:\Users\enric\AppData\Local\Programs\Python\Python310\lib\codecs.py", line 322, in decode
        (result, consumed) = self._buffer_decode(data, self.errors, final)
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 7: invalid continuation byte
@deprobot
Copy link

deprobot commented Jul 5, 2024

EDIT: This is actually resolved. The .txt files need to be saved with UTF-8 encoding. I generated the text files from filenames in a folder through command prompt and it saved them with ANSI encoding by default.

Got this error now as well. Updating extensions and deleting/regenerating venv folder did not help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants