aboutsummaryrefslogtreecommitdiff
path: root/modules/launch_utils.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2024-01-04 11:16:37 +0300
committerGitHub <noreply@github.com>2024-01-04 11:16:37 +0300
commit1e7a8ce5e403de4bef7e09f522a48ce5c1b1d845 (patch)
treed1d0df851e85ffc8c99cad308aad3137322fafff /modules/launch_utils.py
parent397251ba0cc1a1df2c558c28c416b64eef73a051 (diff)
parent50158a1fc9b4dd47a7bef70d34fbb0b30d5e8b47 (diff)
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.py4
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')