1

I'm trying to set Up Stable Diffusion 1.5 from GIT https://github.com/AUTOMATIC1111/stable-diffusion-webui. I've followed a tutorial https://www.youtube.com/watch?v=ycQJDJ-qNI8&t=0s.

To avoid problems with multiple python versions I've removed older Python version and installed only Python 3.10.6, then only 3.10.9, but I receive the same error with both versions.

When I call the web-user.bat to Initialize. The bat calls webui.bat and I receive this error:

Python 3.10.9
venv "D:\Stable Diffusion\stable-diffusion-webui\venv\Scripts\Python.exe"
Fatal Python error: Py_Initialize: unable to load the file system codec
Traceback (most recent call last):
  File "C:\Users\XX\AppData\Local\Programs\Python\Python310\lib\encodings\__init__.py", line 85, in search_function
  File "C:\Users\XX\AppData\Local\Programs\Python\Python310\lib\encodings\__init__.py", line 64, in normalize_encoding
AttributeError: 'str' object has no attribute 'isascii'
Premere un tasto per continuare . . .

I've seen this error is due to using an old python version, but I'm using the 3.10.

Thanks

Ale
  • 946
  • 4
  • 17
  • 28
  • 1
    Was `venv` created before you uninstalled the older versions of Python? Maybe it needs to be deleted and recreated? – Dan Getz Dec 12 '22 at 10:51
  • `str.isascii` was added in Python3.7, so it seems likely that there is something wrong with your Python installation. – snakecharmerb Dec 12 '22 at 12:59
  • @DanGetz it surely was created before, I'll go check it out – Ale Dec 12 '22 at 13:17
  • @snakecharmerb this is probable and that's why I completely removed and install python two or three times. Is there something I can do to check if it is really a clean installation? – Ale Dec 12 '22 at 13:19

1 Answers1

3

The problem was I had a old version of Python when using web-user.bat for the first time. When You run the web-user.bat the first time it creates a venv folder.

The solution was to remove manually the venv folder from my Stable Diffusion folder and use again the web-user.bat.

Ale
  • 946
  • 4
  • 17
  • 28