Bench restore of version 12 backup to version 13 or 14 gives Internal Server Error

When I ran bench restore I get errors as shown below. Trying to open the portal gives “Internal Server Error.”.

Please what I can do to fix this? Thanks so much.

Here is my command:
bench --site nes2021.local --force restore /home/frappe/BackupErp12R/20220918_112627-n2021b-database.sql.gz --with-private-files /home/frappe/BackupErp12R/20220918_112627-n2021b-private-files.tar --with-public-files /home/frappe/BackupErp12R/20220918_112627-n2021b-files.tar

Output:
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/bench/frappe/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
main()
File “/home/bench/frappe/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke

File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1472, in get_hooks
hooks = _dict(cache().get_value(“app_hooks”, _load_app_hooks))
File “/home/bench/frappe/apps/frappe/frappe/utils/redis_wrapper.py”, line 81, in get_value
val = generator()
File “/home/bench/frappe/apps/frappe/frappe/utils/caching.py”, line 57, in wrapper
return_val = func(*args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1441, in _load_app_hooks
app_hooks = get_module(f"{app}.hooks")
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1319, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1006, in _find_and_load_unlocked
File “”, line 688, in _load_unlocked
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/home/bench/frappe/apps/erpnext/erpnext/hooks.py”, line 97, in
“defaults”: {“doctype”: “Sales Order”, “parents”: [{“label”: _(“Orders”), “route”: “orders”}]},
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 115, in _
translated_string = get_full_dict(lang).get(msg)
File “/home/bench/frappe/apps/frappe/frappe/translate.py”, line 275, in get_full_dict
user_translations = get_user_translations(lang)
File “/home/bench/frappe/apps/frappe/frappe/translate.py”, line 338, in get_user_translations
user_translations = frappe.get_all(
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1898, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1870, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/model/db_query.py”, line 171, in execute
result = self.build_and_run()
File “/home/bench/frappe/apps/frappe/frappe/model/db_query.py”, line 186, in build_and_run
args = self.prepare_args()
File “/home/bench/frappe/apps/frappe/frappe/model/db_query.py”, line 225, in prepare_args
self.build_conditions()
File “/home/bench/frappe/apps/frappe/frappe/model/db_query.py”, line 522, in build_conditions
self.build_filter_conditions(self.filters, self.conditions)
File “/home/bench/frappe/apps/frappe/frappe/model/db_query.py”, line 543, in build_filter_conditions
conditions.append(self.prepare_filter_condition(f))
File “/home/bench/frappe/apps/frappe/frappe/model/db_query.py”, line 555, in prepare_filter_condition
f = get_filter(self.doctype, f, additional_filters_config)
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 1769, in get_filter
meta = frappe.get_meta(f.doctype)
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1203, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 51, in get_meta
meta = Meta(doctype)
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 113, in init
super().init(“DocType”, doctype)
File “/home/bench/frappe/apps/frappe/frappe/model/document.py”, line 105, in init
self.load_from_db()
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 118, in load_from_db
super().load_from_db()
File “/home/bench/frappe/apps/frappe/frappe/model/document.py”, line 166, in load_from_db
frappe.db.get_values(
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 566, in get_values
out = self._get_values_from_table(
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 801, in _get_values_from_table
r = self.sql(query, as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 227, in sql
traceback.print_stack()
Error in query:
(“SELECT * FROM tabDocType Link WHERE parent=‘Translation’ AND parenttype=‘DocType’ AND parentfield=‘links’ ORDER BY idx ASC”, None)
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/bench/frappe/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
main()
File “/home/bench/frappe/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/commands/init.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/commands/site.py”, line 208, in restore
_new_site(
File “/home/bench/frappe/apps/frappe/frappe/installer.py”, line 101, in _new_site
install_app(app, verbose=verbose, set_as_patched=not source_sql, force=False)
File “/home/bench/frappe/apps/frappe/frappe/installer.py”, line 256, in install_app
frappe.clear_cache()
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 877, in clear_cache
for fn in get_hooks(“clear_cache”):
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1472, in get_hooks
hooks = _dict(cache().get_value(“app_hooks”, _load_app_hooks))
File “/home/bench/frappe/apps/frappe/frappe/utils/redis_wrapper.py”, line 81, in get_value
val = generator()
File “/home/bench/frappe/apps/frappe/frappe/utils/caching.py”, line 57, in wrapper
return_val = func(*args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1441, in _load_app_hooks
app_hooks = get_module(f"{app}.hooks")
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1319, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1006, in _find_and_load_unlocked
File “”, line 688, in _load_unlocked
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/home/bench/frappe/apps/erpnext/erpnext/hooks.py”, line 97, in
“defaults”: {“doctype”: “Sales Order”, “parents”: [{“label”: _(“Orders”), “route”: “orders”}]},
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 115, in _
translated_string = get_full_dict(lang).get(msg)
File “/home/bench/frappe/apps/frappe/frappe/translate.py”, line 275, in get_full_dict
user_translations = get_user_translations(lang)
File “/home/bench/frappe/apps/frappe/frappe/translate.py”, line 338, in get_user_translations
user_translations = frappe.get_all(
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1898, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1870, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/model/db_query.py”, line 171, in execute
result = self.build_and_run()
File “/home/bench/frappe/apps/frappe/frappe/model/db_query.py”, line 186, in build_and_run
args = self.prepare_args()
File “/home/bench/frappe/apps/frappe/frappe/model/db_query.py”, line 225, in prepare_args
self.build_conditions()
File “/home/bench/frappe/apps/frappe/frappe/model/db_query.py”, line 522, in build_conditions
self.build_filter_conditions(self.filters, self.conditions)
File “/home/bench/frappe/apps/frappe/frappe/model/db_query.py”, line 543, in build_filter_conditions
conditions.append(self.prepare_filter_condition(f))
File “/home/bench/frappe/apps/frappe/frappe/model/db_query.py”, line 555, in prepare_filter_condition
f = get_filter(self.doctype, f, additional_filters_config)
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 1769, in get_filter
meta = frappe.get_meta(f.doctype)
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1203, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 51, in get_meta
meta = Meta(doctype)
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 113, in init
super().init(“DocType”, doctype)
File “/home/bench/frappe/apps/frappe/frappe/model/document.py”, line 105, in init
self.load_from_db()
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 118, in load_from_db
super().load_from_db()
File “/home/bench/frappe/apps/frappe/frappe/model/document.py”, line 166, in load_from_db
frappe.db.get_values(
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 566, in get_values
out = self._get_values_from_table(
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 801, in _get_values_from_table
r = self.sql(query, as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 227, in sql
traceback.print_stack()
Error in query:
(“SELECT * FROM tabDocType State WHERE parent=‘Translation’ AND parenttype=‘DocType’ AND parentfield=‘states’ ORDER BY idx ASC”, None)
App frappe already installed
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/bench/frappe/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
main()
File “/home/bench/frappe/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/commands/init.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/commands/site.py”, line 208, in restore
_new_site(
File “/home/bench/frappe/apps/frappe/frappe/installer.py”, line 105, in _new_site
scheduler.toggle_scheduler(enable_scheduler)
File “/home/bench/frappe/apps/frappe/frappe/utils/scheduler.py”, line 133, in toggle_scheduler
frappe.db.set_value(“System Settings”, None, “enable_scheduler”, 1 if enable else 0)
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 870, in set_value
modified = modified or now()
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 357, in now
return now_datetime().strftime(DATETIME_FORMAT)
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 304, in now_datetime
dt = convert_utc_to_user_timezone(datetime.datetime.utcnow())
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 344, in convert_utc_to_user_timezone
time_zone = get_time_zone()
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 325, in get_time_zone
return frappe.cache().get_value(“time_zone”, _get_time_zone)
File “/home/bench/frappe/apps/frappe/frappe/utils/redis_wrapper.py”, line 81, in get_value
val = generator()
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 318, in _get_time_zone
return frappe.db.get_system_setting(“time_zone”) or “Asia/Kolkata” # Default to India ?!
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 1183, in get_system_setting
return frappe.get_system_settings(key)
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 2277, in get_system_settings
local.system_settings = db.get_singles_dict(“System Settings”, cast=True)
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 684, in get_singles_dict
meta = frappe.get_meta(doctype)
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1203, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 51, in get_meta
meta = Meta(doctype)
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 113, in init
super().init(“DocType”, doctype)
File “/home/bench/frappe/apps/frappe/frappe/model/document.py”, line 105, in init
self.load_from_db()
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 118, in load_from_db
super().load_from_db()
File “/home/bench/frappe/apps/frappe/frappe/model/document.py”, line 166, in load_from_db
frappe.db.get_values(
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 566, in get_values
out = self._get_values_from_table(
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 801, in _get_values_from_table
r = self.sql(query, as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 227, in sql
traceback.print_stack()
Error in query:
(“SELECT * FROM tabDocType Action WHERE parent=‘System Settings’ AND parenttype=‘DocType’ AND parentfield=‘actions’ ORDER BY idx ASC”, None)
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/bench/frappe/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
main()
File “/home/bench/frappe/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/commands/init.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/commands/site.py”, line 208, in restore
_new_site(
File “/home/bench/frappe/apps/frappe/frappe/installer.py”, line 105, in _new_site
scheduler.toggle_scheduler(enable_scheduler)
File “/home/bench/frappe/apps/frappe/frappe/utils/scheduler.py”, line 133, in toggle_scheduler
frappe.db.set_value(“System Settings”, None, “enable_scheduler”, 1 if enable else 0)
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 870, in set_value
modified = modified or now()
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 357, in now
return now_datetime().strftime(DATETIME_FORMAT)
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 304, in now_datetime
dt = convert_utc_to_user_timezone(datetime.datetime.utcnow())
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 344, in convert_utc_to_user_timezone
time_zone = get_time_zone()
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 325, in get_time_zone
return frappe.cache().get_value(“time_zone”, _get_time_zone)
File “/home/bench/frappe/apps/frappe/frappe/utils/redis_wrapper.py”, line 81, in get_value
val = generator()
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 318, in _get_time_zone
return frappe.db.get_system_setting(“time_zone”) or “Asia/Kolkata” # Default to India ?!
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 1183, in get_system_setting
return frappe.get_system_settings(key)
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 2277, in get_system_settings
local.system_settings = db.get_singles_dict(“System Settings”, cast=True)
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 684, in get_singles_dict
meta = frappe.get_meta(doctype)
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1203, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 51, in get_meta
meta = Meta(doctype)
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 113, in init
super().init(“DocType”, doctype)
File “/home/bench/frappe/apps/frappe/frappe/model/document.py”, line 105, in init
self.load_from_db()
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 118, in load_from_db
super().load_from_db()
File “/home/bench/frappe/apps/frappe/frappe/model/document.py”, line 166, in load_from_db
frappe.db.get_values(
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 566, in get_values
out = self._get_values_from_table(
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 801, in _get_values_from_table
r = self.sql(query, as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 227, in sql
traceback.print_stack()
Error in query:
(“SELECT * FROM tabDocType Link WHERE parent=‘System Settings’ AND parenttype=‘DocType’ AND parentfield=‘links’ ORDER BY idx ASC”, None)
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/bench/frappe/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
main()
File “/home/bench/frappe/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/bench/frappe/env/lib/python3.10/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/commands/init.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/bench/frappe/apps/frappe/frappe/commands/site.py”, line 208, in restore
_new_site(
File “/home/bench/frappe/apps/frappe/frappe/installer.py”, line 105, in _new_site
scheduler.toggle_scheduler(enable_scheduler)
File “/home/bench/frappe/apps/frappe/frappe/utils/scheduler.py”, line 133, in toggle_scheduler
frappe.db.set_value(“System Settings”, None, “enable_scheduler”, 1 if enable else 0)
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 870, in set_value
modified = modified or now()
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 357, in now
return now_datetime().strftime(DATETIME_FORMAT)
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 304, in now_datetime
dt = convert_utc_to_user_timezone(datetime.datetime.utcnow())
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 344, in convert_utc_to_user_timezone
time_zone = get_time_zone()
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 325, in get_time_zone
return frappe.cache().get_value(“time_zone”, _get_time_zone)
File “/home/bench/frappe/apps/frappe/frappe/utils/redis_wrapper.py”, line 81, in get_value
val = generator()
File “/home/bench/frappe/apps/frappe/frappe/utils/data.py”, line 318, in _get_time_zone
return frappe.db.get_system_setting(“time_zone”) or “Asia/Kolkata” # Default to India ?!
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 1183, in get_system_setting
return frappe.get_system_settings(key)
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 2277, in get_system_settings
local.system_settings = db.get_singles_dict(“System Settings”, cast=True)
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 684, in get_singles_dict
meta = frappe.get_meta(doctype)
File “/home/bench/frappe/apps/frappe/frappe/init.py”, line 1203, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 51, in get_meta
meta = Meta(doctype)
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 113, in init
super().init(“DocType”, doctype)
File “/home/bench/frappe/apps/frappe/frappe/model/document.py”, line 105, in init
self.load_from_db()
File “/home/bench/frappe/apps/frappe/frappe/model/meta.py”, line 118, in load_from_db
super().load_from_db()
File “/home/bench/frappe/apps/frappe/frappe/model/document.py”, line 166, in load_from_db
frappe.db.get_values(
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 566, in get_values
out = self._get_values_from_table(
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 801, in _get_values_from_table
r = self.sql(query, as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
File “/home/bench/frappe/apps/frappe/frappe/database/database.py”, line 227, in sql
traceback.print_stack()
Error in query:
(“SELECT * FROM tabDocType State WHERE parent=‘System Settings’ AND parenttype=‘DocType’ AND parentfield=‘states’ ORDER BY idx ASC”, None)
nes2021.local: SystemSettings.enable_scheduler is UNSET
*** Scheduler is disabled ***
Site nes2021.local has been restored with files