0xbitches/sd-webui-lcm

Unicode Encode Error

teftef6220 opened this issue · 3 comments

UnicodeDecodeError: 'cp932' codec can't decode byte 0x97 in position 12023: illegal multibyte sequence

An error like this will occur. I can solve the problem by rewriting the code a little, so can I send a pull request?

I have not seen this error before. Can you describe when this occurs? In the meantime, feel free to submit a PR

When starting the WebUI
in line 129

    with gr.Blocks(css="style.css") as lcm:

When I try to read css in

*** Error executing callback ui_tabs_callback for E:\stable-diffusion-webui\extensions\sd-webui-lcm\scripts\main.py
    Traceback (most recent call last):
      File "E:\stable-diffusion-webui\modules\script_callbacks.py", line 166, in ui_tabs_callback
        res += c.callback() or []
      File "E:\stable-diffusion-webui\extensions\sd-webui-lcm\scripts\main.py", line 129, in on_ui_tabs
        with gr.Blocks(css="style.css") as lcm:
      File "E:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 711, in __init__
        self.css = css_file.read()
    UnicodeDecodeError: 'cp932' codec can't decode byte 0x97 in position 12023: illegal multibyte sequence

I get an error like this.

Closing as this should be fixed in 40b6bf2