[Bug]: Latest Pull Does Not Run
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Ran Git Pull to update and now get an error spit out, see console section.
W10
I ran the Python 3.10.6 repair to verify if any python files had been corrupted, they came back clean.
I deleted the folder and did a fresh pull to verify if any files in the webui folder had become corrupted, the result is the same.
This setup worked with an older version. I do not know what the older version was though, it was right after SD 2.0 came out.
Steps to reproduce the problem
- Launch webui_user.bat
- Prompt comes up
- Error is displayed
What should have happened?
It should launch.
Commit where the problem happens
Current as of Feb/22/2023 console does not get far enough to print version.
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
No
List of extensions
No
Console logs
exit code: 1
stderr:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\_common.py", line 92, in _tempfile
os.write(fd, reader())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\abc.py", line 371, in read_bytes
with self.open('rb') as strm:
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\_adapters.py", line 54, in open
raise ValueError()
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\__main__.py", line 29, in <module>
from pip._internal.cli.main import main as _main
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\main.py", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\autocompletion.py", line 10, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\cmdoptions.py", line 24, in <module>
from pip._internal.cli.parser import ConfigOptionParser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\cli\parser.py", line 12, in <module>
from pip._internal.configuration import Configuration, ConfigurationError
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\configuration.py", line 20, in <module>
from pip._internal.exceptions import (
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_internal\exceptions.py", line 13, in <module>
from pip._vendor.requests.models import Request, Response
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\requests\__init__.py", line 149, in <module>
from . import packages, utils
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\requests\utils.py", line 24, in <module>
from . import certs
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_pip.py", line 35, in apply_patches
import certifi
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_certifi.py", line 20, in apply_patches
certifi_win32.wincerts.CERTIFI_PEM = certifi.where()
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi\core.py", line 72, in where
_CACERT_PATH = str(_CACERT_CTX.__enter__())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in __enter__
return next(self.gen)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\_common.py", line 98, in _tempfile
_os_remove(raw_path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\User\\AppData\\Local\\Temp\\tmpa7h90daw'
Launch unsuccessful. Exiting.
Press any key to continue . . .
Additional information
No response
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\User\\AppData\\Local\\Temp\\tmpa7h90daw'
Try emptying your temp-folder, that has helped before with a similar message. If that doesn't work, because some process is actually blocking, try rebooting first.
Temp folder cleared.
I have rebooted between each step since I wanted to make sure something wasn't left running when it crashed.
The script creates a new temp file every time it runs so it should be the only thing using that file.
It crashes with the same error.
Disabled Windows Defender real time protection thinking maybe it was scanning the file at creation and causing the crash. Script still crashes at the same point.
I'm having the same issue, I had to rollback all the way to commit hash 925dd09c91e7338aef72e4ec99d67b8b57280215 to return my install to a functioning state.
Found the offending commit, at least for me: 48a15821de768fea76e66f26df83df3fddf18f4b any commit on this or after, fails with the above error. Any commit previous to this works fine.
Rolling back to 925dd09 lets it get much further but it eventually fails.
venv "D:\AI Image Generator\Stable Diffusion\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 925dd09c91e7338aef72e4ec99d67b8b57280215
Installing requirements for Web UI
Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Loading weights [67a115286b] from D:\AI Image Generator\Stable Diffusion\stable-diffusion-webui\models\Stable-diffusion\Anything-V3.0-pruned-fp32.ckpt
Applying cross attention optimization (Doggettx).
Textual inversion embeddings loaded(0):
Model loaded in 11.3s (1.6s create model, 6.8s load weights).
Running on local URL: http://127.0.0.1:7860
To create a public link, set share=True
in launch()
.
Traceback (most recent call last):
File "D:\AI Image Generator\Stable Diffusion\stable-diffusion-webui\launch.py", line 317, in
start()
File "D:\AI Image Generator\Stable Diffusion\stable-diffusion-webui\launch.py", line 312, in start
webui.webui()
File "D:\AI Image Generator\Stable Diffusion\stable-diffusion-webui\webui.py", line 196, in webui
app.add_middleware(GZipMiddleware, minimum_size=1000)
File "D:\AI Image Generator\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py", line 135, in add_middleware
raise RuntimeError("Cannot add middleware after an application has started")
RuntimeError: Cannot add middleware after an application has started
Press any key to continue . . .
RuntimeError: Cannot add middleware after an application has started
I remember that error message, that was fixed here:
https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/4f4debbadbf665c483416ee02e12c9b987765103
Seems I'm stuck between one bug and another then. A man just wants to prompt...
I'd focus on getting the current version to run.
I take it you have a tried a new install? (clone into new folder and run from there).
I have, the error above was cloned into a fresh folder. I tried that after the git pull ran into the same error. I just pull my models folder out so I don't have to redownload them before deleting the folder and trying again.
I can try updating to 4f4debb to see if it will run however I agree that getting the latest to run would be ideal.
Just tried updating to 4f4debb, get the same error as this issue is opened under. I'll wipe the folder and clone a fresh copy once a possible fix is pushed.
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\_common.py", line 98, in _tempfile
_os_remove(raw_path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\User\\AppData\\Local\\Temp\\tmpa7h90daw'
Well, since it seems to be only the removal of a temp file that is the issue, to make sure, you could try the following:
Go to C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_common.py
Find this code:
try:
_os_remove(raw_path)
except FileNotFoundError:
pass
and change the except line to:
except FileNotFoundError or PermissionError:
and see what happens then.
Changed the line in the file, error below;
exit code: 1
stderr:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_common.py", line 92, in _tempfile
os.write(fd, reader())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\abc.py", line 371, in read_bytes
with self.open('rb') as strm:
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_adapters.py", line 54, in open
raise ValueError()
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_main.py", line 29, in
from pip._internal.cli.main import main as _main
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\main.py", line 9, in
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\autocompletion.py", line 10, in
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\main_parser.py", line 8, in
from pip._internal.cli import cmdoptions
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\cmdoptions.py", line 24, in
from pip._internal.cli.parser import ConfigOptionParser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\parser.py", line 12, in
from pip._internal.configuration import Configuration, ConfigurationError
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\configuration.py", line 20, in
from pip._internal.exceptions import (
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\exceptions.py", line 13, in
from pip.vendor.requests.models import Request, Response
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\requests_init.py", line 149, in
from . import packages, utils
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\requests\utils.py", line 24, in
from . import certs
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_pip.py", line 35, in apply_patches
import certifi
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_certifi.py", line 20, in apply_patches
certifi_win32.wincerts.CERTIFI_PEM = certifi.where()
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi\core.py", line 72, in where
_CACERT_PATH = str(_CACERT_CTX.enter())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in enter
return next(self.gen)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_common.py", line 98, in _tempfile
_os_remove(raw_path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\User\AppData\Local\Temp\tmpgy26w_xm'
Launch unsuccessful. Exiting.
Press any key to continue . . .
Well, first I had a typo, sorry, instead of
C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_common.py
it should be
C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_common.py
Also it could be it's still running the old version from a cache.
Check if you have a pycache subdirectory where you changed the file and in there delete _common.cpython-310.pyc and try again...
Nevermind about the typo, not true, github removed the backslash before the underbar...
File is C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_common.py
and delete pycache\_common.cpython-310.pyc
I do not have a file called importlib_common.py located in C:\Users\User\AppData\Local\Programs\Python\Python310\lib
However I do have a _common.py located in
C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib
This is the file I modified.
I have also deleted the _common.cpython-310.pyc located in C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\pycache\
If it matters, for whatever reason my lib is Lib. No idea why, it installed that way. I know windows doesn't care about case but not sure if python does.
Below is the error.
exit code: 1
stderr:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_common.py", line 92, in _tempfile
os.write(fd, reader())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\abc.py", line 371, in read_bytes
with self.open('rb') as strm:
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_adapters.py", line 54, in open
raise ValueError()
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_main.py", line 29, in
from pip._internal.cli.main import main as _main
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\main.py", line 9, in
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\autocompletion.py", line 10, in
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\main_parser.py", line 8, in
from pip._internal.cli import cmdoptions
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\cmdoptions.py", line 24, in
from pip._internal.cli.parser import ConfigOptionParser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\parser.py", line 12, in
from pip._internal.configuration import Configuration, ConfigurationError
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\configuration.py", line 20, in
from pip._internal.exceptions import (
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\exceptions.py", line 13, in
from pip.vendor.requests.models import Request, Response
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\requests_init.py", line 149, in
from . import packages, utils
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\requests\utils.py", line 24, in
from . import certs
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_pip.py", line 35, in apply_patches
import certifi
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_certifi.py", line 20, in apply_patches
certifi_win32.wincerts.CERTIFI_PEM = certifi.where()
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi\core.py", line 72, in where
_CACERT_PATH = str(_CACERT_CTX.enter())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in enter
return next(self.gen)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_common.py", line 98, in _tempfile
_os_remove(raw_path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\User\AppData\Local\Temp\tmpup4kvkxf'
Launch unsuccessful. Exiting.
Press any key to continue . . .
Can you attach the file you changed here?
Zipped it since github claims .py files are not supported.
_common.zip
Ok, thanks. Can you try this syntax instead:
except (FileNotFoundError, PermissionError) as e:
Then delete the cache file again and one more try. Hope we'll get something different this time.
Updated the file and deleted the cached file. Error below;
exit code: 1
stderr:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_main.py", line 29, in
from pip._internal.cli.main import main as _main
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\main.py", line 9, in
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\autocompletion.py", line 10, in
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\main_parser.py", line 8, in
from pip._internal.cli import cmdoptions
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\cmdoptions.py", line 24, in
from pip._internal.cli.parser import ConfigOptionParser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\parser.py", line 12, in
from pip._internal.configuration import Configuration, ConfigurationError
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\configuration.py", line 20, in
from pip._internal.exceptions import (
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\exceptions.py", line 13, in
from pip.vendor.requests.models import Request, Response
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\requests_init.py", line 149, in
from . import packages, utils
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\requests\utils.py", line 24, in
from . import certs
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_pip.py", line 35, in apply_patches
import certifi
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_certifi.py", line 20, in apply_patches
certifi_win32.wincerts.CERTIFI_PEM = certifi.where()
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi\core.py", line 72, in where
_CACERT_PATH = str(_CACERT_CTX.enter())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in enter
return next(self.gen)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_common.py", line 92, in _tempfile
os.write(fd, reader())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\abc.py", line 371, in read_bytes
with self.open('rb') as strm:
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_adapters.py", line 54, in open
raise ValueError()
ValueError
Launch unsuccessful. Exiting.
Press any key to continue . .
Well, something new. Unfortunately even with less info.
Ok, let's try something different. Can you post from the start of you console log, maybe we can find something there. From the very top:
z:\AI\tests\stable-diffusion-webui_20230226>webui-user.bat
venv "z:\AI\tests\stable-diffusion-webui_20230226\venv\Scripts\Python.exe"
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Launching the batch file via command prompt gives the same output minus the line of me executing the script. Error below.
D:\AI Image Generator\Stable Diffusion\stable-diffusion-webui>webui-user.bat
exit code: 1
stderr:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_main.py", line 29, in
from pip._internal.cli.main import main as _main
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\main.py", line 9, in
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\autocompletion.py", line 10, in
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\main_parser.py", line 8, in
from pip._internal.cli import cmdoptions
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\cmdoptions.py", line 24, in
from pip._internal.cli.parser import ConfigOptionParser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\parser.py", line 12, in
from pip._internal.configuration import Configuration, ConfigurationError
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\configuration.py", line 20, in
from pip._internal.exceptions import (
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\exceptions.py", line 13, in
from pip.vendor.requests.models import Request, Response
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\requests_init.py", line 149, in
from . import packages, utils
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\requests\utils.py", line 24, in
from . import certs
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_pip.py", line 35, in apply_patches
import certifi
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_certifi.py", line 20, in apply_patches
certifi_win32.wincerts.CERTIFI_PEM = certifi.where()
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi\core.py", line 72, in where
_CACERT_PATH = str(_CACERT_CTX.enter())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in enter
return next(self.gen)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_common.py", line 92, in _tempfile
os.write(fd, reader())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\abc.py", line 371, in read_bytes
with self.open('rb') as strm:
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_adapters.py", line 54, in open
raise ValueError()
ValueError
Launch unsuccessful. Exiting.
Press any key to continue . . .
Oh. I hadn't realized this happens even before the venv message is displayed.
Can you execute python -mpip
Does this give the same error?
The output of the requested command. I apologize if I'm less responsive for the next couple hours. I'll try to refresh when I can.
D:\AI Image Generator\Stable Diffusion\stable-diffusion-webui>python -mpip
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_main.py", line 29, in
from pip._internal.cli.main import main as _main
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\main.py", line 9, in
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\autocompletion.py", line 10, in
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\main_parser.py", line 8, in
from pip._internal.cli import cmdoptions
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\cmdoptions.py", line 24, in
from pip._internal.cli.parser import ConfigOptionParser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\parser.py", line 12, in
from pip._internal.configuration import Configuration, ConfigurationError
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\configuration.py", line 20, in
from pip._internal.exceptions import (
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\exceptions.py", line 13, in
from pip.vendor.requests.models import Request, Response
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\requests_init.py", line 149, in
from . import packages, utils
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\requests\utils.py", line 24, in
from . import certs
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_pip.py", line 35, in apply_patches
import certifi
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_certifi.py", line 20, in apply_patches
certifi_win32.wincerts.CERTIFI_PEM = certifi.where()
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi\core.py", line 72, in where
_CACERT_PATH = str(_CACERT_CTX.enter())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in enter
return next(self.gen)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_common.py", line 92, in _tempfile
os.write(fd, reader())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\abc.py", line 371, in read_bytes
with self.open('rb') as strm:
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_adapters.py", line 54, in open
raise ValueError()
ValueError
D:\AI Image Generator\Stable Diffusion\stable-diffusion-webui>
Okay, so your python can't access pip. Does pip -V work?
It's pretty late here, I'll look at it again in the morning. But that's progress, hope we'll get you prompting by tomorrow!
Ran the command, it errored out. I tried the python repair again, it came back clean. Let me know if I should do a full uninstall/reinstall of python on the machine. Have a good night.
D:\AI Image Generator\Stable Diffusion\stable-diffusion-webui>pip -V
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\Scripts\pip.exe_main.py", line 4, in
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\main.py", line 9, in
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\autocompletion.py", line 10, in
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\main_parser.py", line 8, in
from pip._internal.cli import cmdoptions
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\cmdoptions.py", line 24, in
from pip._internal.cli.parser import ConfigOptionParser
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\cli\parser.py", line 12, in
from pip._internal.configuration import Configuration, ConfigurationError
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\configuration.py", line 20, in
from pip._internal.exceptions import (
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_internal\exceptions.py", line 13, in
from pip.vendor.requests.models import Request, Response
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\requests_init.py", line 149, in
from . import packages, utils
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\requests\utils.py", line 24, in
from . import certs
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_pip.py", line 35, in apply_patches
import certifi
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 177, in _exec_module
notify_module_loaded(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\decorators.py", line 470, in _synchronized
return wrapped(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\wrapt\importer.py", line 136, in notify_module_loaded
hook(module)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi_win32\wrapt_certifi.py", line 20, in apply_patches
certifi_win32.wincerts.CERTIFI_PEM = certifi.where()
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\certifi\core.py", line 72, in where
_CACERT_PATH = str(_CACERT_CTX.enter())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in enter
return next(self.gen)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_common.py", line 92, in _tempfile
os.write(fd, reader())
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib\abc.py", line 371, in read_bytes
with self.open('rb') as strm:
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\importlib_adapters.py", line 54, in open
raise ValueError()
ValueError
D:\AI Image Generator\Stable Diffusion\stable-diffusion-webui>
Fully removed and reinstalled python. This time installed it to a different drive since anything on C is always fucky. Now pip -v works. So far it is trying. Will update with either any error that is thrown or or just close the issue.
We back to prompting boys.
I'll have to get used to the new way the UI is laid out.
Thanks for all the help, I'm useless when it comes to python.
Good to hear :smiley: Enjoy your prompting. Sieg Zeon.
I met the same issue 3 weeks ago and drove me crazy!
Thank you so much for the solution.