AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
131.7k stars 25.27k forks source link

[Bug]: After upgrading to 1.9.0, you can't start it, you will report "Expected String or Bytes-Like Object" #15599

Open AIGC404 opened 4 weeks ago

AIGC404 commented 4 weeks ago

Checklist

What happened?

image The problem comes from the file modules/launch_utills.py: 307

After investigation, it was found that when the Package parameter was ‘spandrel’. So it caused abnormalities

The following is the modified code, adding a judgment that returns False if version_installed is empty

image

Steps to reproduce the problem

Version updated to 1.9.0

What should have happened?

Successfully started

What browsers do you use to access the UI ?

No response

Sysinfo

No need to provide

Console logs

Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.9.3
Commit hash: 1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0
Traceback (most recent call last):
  File "C:\sd-webui-aki-v4.1\launch.py", line 48, in <module>
    main()
  File "C:\sd-webui-aki-v4.1\launch.py", line 39, in main
    prepare_environment()
  File "C:\sd-webui-aki-v4.1\modules\launch_utils.py", line 421, in prepare_environment
    if not requirements_met(requirements_file):
  File "C:\sd-webui-aki-v4.1\modules\launch_utils.py", line 311, in requirements_met
    if packaging.version.parse(version_required) != packaging.version.parse(version_installed):
  File "C:\sd-webui-aki-v4.1\python\lib\site-packages\packaging\version.py", line 54, in parse
    return Version(version)
  File "C:\sd-webui-aki-v4.1\python\lib\site-packages\packaging\version.py", line 198, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object

--------
[程序异常退出,退出代码为 1 (0x00000001)]

Additional information

No response

w-e-w commented 3 weeks ago

try deleting the venv

I'm guessing what most likely happen is that for whatever reason spandrel was not successfully installed