diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2024-01-04 08:16:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-04 08:16:37 +0000 |
commit | 1e7a8ce5e403de4bef7e09f522a48ce5c1b1d845 (patch) | |
tree | d1d0df851e85ffc8c99cad308aad3137322fafff /modules/launch_utils.py | |
parent | 397251ba0cc1a1df2c558c28c416b64eef73a051 (diff) | |
parent | 50158a1fc9b4dd47a7bef70d34fbb0b30d5e8b47 (diff) | |
download | stable-diffusion-webui-gfx803-1e7a8ce5e403de4bef7e09f522a48ce5c1b1d845.tar.gz stable-diffusion-webui-gfx803-1e7a8ce5e403de4bef7e09f522a48ce5c1b1d845.tar.bz2 stable-diffusion-webui-gfx803-1e7a8ce5e403de4bef7e09f522a48ce5c1b1d845.zip |
Merge pull request #14525 from AUTOMATIC1111/handle-config.json-failed-to-load
handle config.json failed to load
Diffstat (limited to 'modules/launch_utils.py')
-rw-r--r-- | modules/launch_utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/launch_utils.py b/modules/launch_utils.py index febd8c24..7ebdf0b4 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -250,7 +250,9 @@ def list_extensions(settings_file): except FileNotFoundError:
pass
except Exception:
- errors.report("Could not load settings", exc_info=True)
+ errors.report(f'\nCould not load settings\nThe config file "{settings_file}" is likely corrupted\nIt has been moved to the "tmp/config.json"\nReverting config to default\n\n''', exc_info=True)
+ os.replace(settings_file, os.path.join(script_path, "tmp", "config.json"))
+ settings = {}
disabled_extensions = set(settings.get('disabled_extensions', []))
disable_all_extensions = settings.get('disable_all_extensions', 'none')
|