bench migrate error
$ bench migrate
Migrating nginsights.realgroup.org
Updating DocTypes for frappe : [========================================] 100%
Updating DocTypes for insights : [=========== ] 29%Queued rebuilding of search index for nginsights.realgroup.org
Traceback with variables (most recent call last):
File ââ, line 198, in _run_module_as_main
mod_name = âfrappe.utils.bench_helperâ
alter_argv = True
mod_spec = ModuleSpec(name=âfrappe.utils.bench_helperâ, loader=<_frozen_importlib_external.SourceFileLoader object at 0x7a49e1b01910>, origin=â/home/insights/insights/apps/frappe/frappe/utils/bench_helper.pyâ)
code = <code object at 0x2c02780, file â/home/insights/insights/apps/frappe/frappe/utils/bench_helper.pyâ, line 1>
main_globals = {ânameâ: âmainâ, âdocâ: None, âpackageâ: âfrappe.utilsâ, âloaderâ: <_frozen_importlib_external.SourceFileLoader object at 0x7a49e1b01910>, âspecâ: ModuleSpec(name=âfrappe.utils.bench_helperâ, loader=<_frozen_importlib_external.SourceFileLoader object at 0x7a49e1b01910>, origin=â/home/insights/insights/apps/frappe/frappe/utils/bench_helper.pyâ), âannotationsâ: {}, âbuiltinsâ: <module âbuiltinsâ (built-in)>, âfileâ: â/home/insights/insights/apps/frappe/frappe/utils/bench_helper.pyâ, âcachedâ: â/home/insights/insights/apps/frappe/frappe/utils/pycache/bench_helper.cpython-312.pycâ, âimportlibâ: <module âimportlibâ from â/usr/lib/python3.12/importlib/init.pyâ>, âjsonâ: <module âjsonâ from â/usr/lib/python3.12/json/init.pyâ>, âosâ: <module âosâ (frozen)>, âtracebackâ: <module âtracebackâ from â/usr/lib/python3.12/traceback.pyâ>, âwarningsâ: <module âwarningsâ from â/usr/lib/python3.12/warnings.pyâ>, âPathâ: <class âpathlib.Pathâ>, âdedentâ:âŚ
File ââ, line 88, in _run_code
code = <code object at 0x2c02780, file â/home/insights/insights/apps/frappe/frappe/utils/bench_helper.pyâ, line 1>
run_globals = {ânameâ: âmainâ, âdocâ: None, âpackageâ: âfrappe.utilsâ, âloaderâ: <_frozen_importlib_external.SourceFileLoader object at 0x7a49e1b01910>, âspecâ: ModuleSpec(name=âfrappe.utils.bench_helperâ, loader=<_frozen_importlib_external.SourceFileLoader object at 0x7a49e1b01910>, origin=â/home/insights/insights/apps/frappe/frappe/utils/bench_helper.pyâ), âannotationsâ: {}, âbuiltinsâ: <module âbuiltinsâ (built-in)>, âfileâ: â/home/insights/insights/apps/frappe/frappe/utils/bench_helper.pyâ, âcachedâ: â/home/insights/insights/apps/frappe/frappe/utils/pycache/bench_helper.cpython-312.pycâ, âimportlibâ: <module âimportlibâ from â/usr/lib/python3.12/importlib/init.pyâ>, âjsonâ: <module âjsonâ from â/usr/lib/python3.12/json/init.pyâ>, âosâ: <module âosâ (frozen)>, âtracebackâ: <module âtracebackâ from â/usr/lib/python3.12/traceback.pyâ>, âwarningsâ: <module âwarningsâ from â/usr/lib/python3.12/warnings.pyâ>, âPathâ: <class âpathlib.Pathâ>, âdedentâ:âŚ
init_globals = None
mod_name = âmainâ
mod_spec = ModuleSpec(name=âfrappe.utils.bench_helperâ, loader=<_frozen_importlib_external.SourceFileLoader object at 0x7a49e1b01910>, origin=â/home/insights/insights/apps/frappe/frappe/utils/bench_helper.pyâ)
pkg_name = âfrappe.utilsâ
script_name = None
loader = <_frozen_importlib_external.SourceFileLoader object at 0x7a49e1b01910>
fname = â/home/insights/insights/apps/frappe/frappe/utils/bench_helper.pyâ
cached = â/home/insights/insights/apps/frappe/frappe/utils/pycache/bench_helper.cpython-312.pycâ
File â/home/insights/insights/apps/frappe/frappe/utils/bench_helper.pyâ, line 114, in
main()
âŚskipped⌠27 vars
File â/home/insights/insights/apps/frappe/frappe/utils/bench_helper.pyâ, line 20, in main
click.Group(commands=commands)(prog_name=âbenchâ)
commands = {âfrappeâ: , âget-frappe-commandsâ: , âget-frappe-helpâ: }
File â/home/insights/insights/env/lib/python3.12/site-packages/click/core.pyâ, line 1157, in call
return self.main(*args, **kwargs)
self =
args = ()
kwargs = {âprog_nameâ: âbenchâ}
File â/home/insights/insights/env/lib/python3.12/site-packages/click/core.pyâ, line 1078, in main
rv = self.invoke(ctx)
self =
args = [âfrappeâ, âmigrateâ]
prog_name = âbenchâ
complete_var = None
standalone_mode = True
windows_expand_args = True
extra = {}
ctx = <click.core.Context object at 0x7a49e224f050>
File â/home/insights/insights/env/lib/python3.12/site-packages/click/core.pyâ, line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
self =
ctx = <click.core.Context object at 0x7a49e224f050>
_process_result = <function MultiCommand.invoke.._process_result at 0x7a49e057dbc0>
args = [âmigrateâ]
cmd_name = âfrappeâ
cmd =
sub_ctx = <click.core.Context object at 0x7a49e0d4e2d0>
class = <class âclick.core.MultiCommandâ>
File â/home/insights/insights/env/lib/python3.12/site-packages/click/core.pyâ, line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
self =
ctx = <click.core.Context object at 0x7a49e0d4e2d0>
_process_result = <function MultiCommand.invoke.._process_result at 0x7a49e057db20>
args =
cmd_name = âmigrateâ
cmd =
sub_ctx = <click.core.Context object at 0x7a49e0574770>
class = <class âclick.core.MultiCommandâ>
File â/home/insights/insights/env/lib/python3.12/site-packages/click/core.pyâ, line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
self =
ctx = <click.core.Context object at 0x7a49e0574770>
File â/home/insights/insights/env/lib/python3.12/site-packages/click/core.pyâ, line 783, in invoke
return __callback(*args, **kwargs)
_Context__self = <click.core.Context object at 0x7a49e0574770>
_Context__callback = <function migrate at 0x7a49e05b7ba0>
args = ()
kwargs = {âskip_failingâ: False, âskip_search_indexâ: False}
ctx = <click.core.Context object at 0x7a49e0574770>
File â/home/insights/insights/env/lib/python3.12/site-packages/click/decorators.pyâ, line 33, in new_func
return f(get_current_context(), *args, **kwargs)
args = ()
kwargs = {âskip_failingâ: False, âskip_search_indexâ: False}
f = <function migrate at 0x7a49e05b7920>
File â/home/insights/insights/apps/frappe/frappe/commands/init.pyâ, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
ctx = <click.core.Context object at 0x7a49e0574770>
args = ()
kwargs = {âskip_failingâ: False, âskip_search_indexâ: False}
profile = False
f = <function migrate at 0x7a49e05b7880>
File â/home/insights/insights/apps/frappe/frappe/commands/site.pyâ, line 616, in migrate
).run(site=site)
context = {âsitesâ: [ânginsights.realgroup.orgâ], âforceâ: False, âverboseâ: False, âprofileâ: False}
skip_failing = False
skip_search_index = False
activate_by_import = <module âtraceback_with_variables.activate_by_importâ from â/home/insights/insights/env/lib/python3.12/site-packages/traceback_with_variables/activate_by_import.pyâ>
SiteMigration = <class âfrappe.migrate.SiteMigrationâ>
site = ânginsights.realgroup.orgâ
File â/home/insights/insights/apps/frappe/frappe/migrate.pyâ, line 186, in run
self.run_schema_updates()
self = <frappe.migrate.SiteMigration object at 0x7a49da6c8980>
site = ânginsights.realgroup.orgâ
filelock = <function filelock at 0x7a49d6daea20>
File â/home/insights/insights/apps/frappe/frappe/migrate.pyâ, line 52, in wrapper
raise e
args = (<frappe.migrate.SiteMigration object at 0x7a49da6c8980>,)
kwargs = {}
method = <function SiteMigration.run_schema_updates at 0x7a49d6dae520>
File â/home/insights/insights/apps/frappe/frappe/migrate.pyâ, line 44, in wrapper
ret = method(*args, **kwargs)
args = (<frappe.migrate.SiteMigration object at 0x7a49da6c8980>,)
kwargs = {}
method = <function SiteMigration.run_schema_updates at 0x7a49d6dae520>
File â/home/insights/insights/apps/frappe/frappe/migrate.pyâ, line 120, in run_schema_updates
frappe.model.sync.sync_all()
self = <frappe.migrate.SiteMigration object at 0x7a49da6c8980>
File â/home/insights/insights/apps/frappe/frappe/model/sync.pyâ, line 43, in sync_all
sync_for(app, force, reset_permissions=reset_permissions)
force = 0
reset_permissions = False
app = âinsightsâ
File â/home/insights/insights/apps/frappe/frappe/model/sync.pyâ, line 111, in sync_for
import_file_by_path(
app_name = âinsightsâ
force = 0
reset_permissions = False
files = [â/home/insights/insights/apps/insights/insights/insights/doctype/insights_query_variable/insights_query_variable.jsonâ, â/home/insights/insights/apps/insights/insights/insights/doctype/insights_table_import/insights_table_import.jsonâ, â/home/insights/insights/apps/insights/insights/insights/doctype/insights_query_chart/insights_query_chart.jsonâ, â/home/insights/insights/apps/insights/insights/insights/doctype/insights_query/insights_query.jsonâ, â/home/insights/insights/apps/insights/insights/insights/doctype/insights_query_execution_log/insights_query_execution_log.jsonâ, â/home/insights/insights/apps/insights/insights/insights/doctype/insights_query_column/insights_query_column.jsonâ, â/home/insights/insights/apps/insights/insights/insights/doctype/insights_notebook/insights_notebook.jsonâ, â/home/insights/insights/apps/insights/insights/insights/doctype/insights_alert/insights_alert.jsonâ, â/home/insights/insights/apps/insights/insights/insights/doctype/insights_team_member/insigâŚ
module_name = âinsightsâ
folder = â/home/insights/insights/apps/insights/insights/insightsâ
l = 24
i = 7
doc_path = â/home/insights/insights/apps/insights/insights/insights/doctype/insights_alert/insights_alert.jsonâ
File â/home/insights/insights/apps/frappe/frappe/modules/import_file.pyâ, line 146, in import_file_by_path
import_doc(
path = â/home/insights/insights/apps/insights/insights/insights/doctype/insights_alert/insights_alert.jsonâ
force = 0
data_import = False
pre_process = None
ignore_version = True
reset_permissions = False
docs = [{âactionsâ: , âallow_renameâ: 1, âcreationâ: â2023-03-30 16:39:47.081742â, âdefault_viewâ: âListâ, âdoctypeâ: âDocTypeâ, âeditable_gridâ: 1, âengineâ: âInnoDBâ, âfieldsâ: [{âdefaultâ: â0â, âfieldnameâ: âdisabledâ, âfieldtypeâ: âCheckâ, âlabelâ: âDisabledâ, âdoctypeâ: âDocFieldâ}, {âfieldnameâ: âsection_break_cmx9â, âfieldtypeâ: âSection Breakâ, âdoctypeâ: âDocFieldâ}, {âfieldnameâ: âtitleâ, âfieldtypeâ: âDataâ, âlabelâ: âTitleâ, âreqdâ: 1, âdoctypeâ: âDocFieldâ}, {âdefaultâ: âEmailâ, âfieldnameâ: âchannelâ, âfieldtypeâ: âSelectâ, âlabelâ: âChannelâ, âoptionsâ: âEmail\nTelegramâ, âdoctypeâ: âDocFieldâ}, {âfieldnameâ: âqueryâ, âfieldtypeâ: âLinkâ, âin_list_viewâ: 1, âlabelâ: âQueryâ, âoptionsâ: âInsights Queryâ, âreqdâ: 1, âdoctypeâ: âDocFieldâ}, {âdefaultâ: âHourlyâ, âfieldnameâ: âfrequencyâ, âfieldtypeâ: âSelectâ, âlabelâ: âFrequencyâ, âoptionsâ: âHourly\nDaily\nWeekly\nMonthly\nCronâ, âdoctypeâ: âDocFieldâ}, {âdepends_onâ: âeval: doc.frequency == âCronââ, âfieldnameâ: âcron_formatââŚ
calculated_hash = âe85bf92c0c49e2d62ea075b3e8e871e9â
doc = {âactionsâ: , âallow_renameâ: 1, âcreationâ: â2023-03-30 16:39:47.081742â, âdefault_viewâ: âListâ, âdoctypeâ: âDocTypeâ, âeditable_gridâ: 1, âengineâ: âInnoDBâ, âfieldsâ: [{âdefaultâ: â0â, âfieldnameâ: âdisabledâ, âfieldtypeâ: âCheckâ, âlabelâ: âDisabledâ, âdoctypeâ: âDocFieldâ}, {âfieldnameâ: âsection_break_cmx9â, âfieldtypeâ: âSection Breakâ, âdoctypeâ: âDocFieldâ}, {âfieldnameâ: âtitleâ, âfieldtypeâ: âDataâ, âlabelâ: âTitleâ, âreqdâ: 1, âdoctypeâ: âDocFieldâ}, {âdefaultâ: âEmailâ, âfieldnameâ: âchannelâ, âfieldtypeâ: âSelectâ, âlabelâ: âChannelâ, âoptionsâ: âEmail\nTelegramâ, âdoctypeâ: âDocFieldâ}, {âfieldnameâ: âqueryâ, âfieldtypeâ: âLinkâ, âin_list_viewâ: 1, âlabelâ: âQueryâ, âoptionsâ: âInsights Queryâ, âreqdâ: 1, âdoctypeâ: âDocFieldâ}, {âdefaultâ: âHourlyâ, âfieldnameâ: âfrequencyâ, âfieldtypeâ: âSelectâ, âlabelâ: âFrequencyâ, âoptionsâ: âHourly\nDaily\nWeekly\nMonthly\nCronâ, âdoctypeâ: âDocFieldâ}, {âdepends_onâ: âeval: doc.frequency == âCronââ, âfieldnameâ: âcron_formatâ,âŚ
db_modified_timestamp = datetime.datetime(2024, 6, 12, 11, 3, 53, 620270)
is_db_timestamp_latest = True
stored_hash = None
File â/home/insights/insights/apps/frappe/frappe/modules/import_file.pyâ, line 239, in import_doc
doc.insert()
docdict = {âactionsâ: , âallow_renameâ: 1, âcreationâ: â2023-03-30 16:39:47.081742â, âdefault_viewâ: âListâ, âdoctypeâ: âDocTypeâ, âeditable_gridâ: 1, âengineâ: âInnoDBâ, âfieldsâ: [{âdefaultâ: â0â, âfieldnameâ: âdisabledâ, âfieldtypeâ: âCheckâ, âlabelâ: âDisabledâ, âdoctypeâ: âDocFieldâ}, {âfieldnameâ: âsection_break_cmx9â, âfieldtypeâ: âSection Breakâ, âdoctypeâ: âDocFieldâ}, {âfieldnameâ: âtitleâ, âfieldtypeâ: âDataâ, âlabelâ: âTitleâ, âreqdâ: 1, âdoctypeâ: âDocFieldâ}, {âdefaultâ: âEmailâ, âfieldnameâ: âchannelâ, âfieldtypeâ: âSelectâ, âlabelâ: âChannelâ, âoptionsâ: âEmail\nTelegramâ, âdoctypeâ: âDocFieldâ}, {âfieldnameâ: âqueryâ, âfieldtypeâ: âLinkâ, âin_list_viewâ: 1, âlabelâ: âQueryâ, âoptionsâ: âInsights Queryâ, âreqdâ: 1, âdoctypeâ: âDocFieldâ}, {âdefaultâ: âHourlyâ, âfieldnameâ: âfrequencyâ, âfieldtypeâ: âSelectâ, âlabelâ: âFrequencyâ, âoptionsâ: âHourly\nDaily\nWeekly\nMonthly\nCronâ, âdoctypeâ: âDocFieldâ}, {âdepends_onâ: âeval: doc.frequency == âCronââ, âfieldnameâ: âcron_formatâ,âŚ
data_import = False
pre_process = None
ignore_version = True
reset_permissions = False
path = â/home/insights/insights/apps/insights/insights/insights/doctype/insights_alert/insights_alert.jsonâ
controller = <class âfrappe.core.doctype.doctype.doctype.DocTypeâ>
doc = <DocType: Insights Alert>
File â/home/insights/insights/apps/frappe/frappe/model/document.pyâ, line 315, in insert
self.run_post_save_methods()
self = <DocType: Insights Alert>
ignore_permissions = None
ignore_links = None
ignore_if_duplicate = False
ignore_mandatory = None
set_name = None
set_child_names = True
d = <DocPerm: oq0fag0bgi parent=Insights Alert>
File â/home/insights/insights/apps/frappe/frappe/model/document.pyâ, line 1128, in run_post_save_methods
self.run_method(âon_updateâ)
self = <DocType: Insights Alert>
File â/home/insights/insights/apps/frappe/frappe/model/document.pyâ, line 962, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
self = <DocType: Insights Alert>
method = âon_updateâ
args = ()
kwargs = {}
fn = <function Document.run_method..fn at 0x7a49ded11b20>
File â/home/insights/insights/apps/frappe/frappe/model/document.pyâ, line 1322, in composer
return composed(self, method, args, **kwargs)
self = <DocType: Insights Alert>
args = ()
kwargs = {}
hooks = [<function build_domain_restriced_doctype_cache at 0x7a49e042d080>, <function clear_doctype_notifications at 0x7a49ddf51580>, <function process_workflow_actions at 0x7a49d1ff07c0>, <function attach_files_to_document at 0x7a49decb31a0>, <function apply at 0x7a49d1ff3420>, <function update_due_date at 0x7a49d1ff34c0>, <function apply_permissions_for_non_standard_user_type at 0x7a49d1e38b80>]
method = âon_updateâ
doc_events = {'â: {âon_updateâ: [âfrappe.desk.notifications.clear_doctype_notificationsâ, âfrappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actionsâ, âfrappe.core.doctype.file.utils.attach_files_to_documentâ, âfrappe.automation.doctype.assignment_rule.assignment_rule.applyâ, âfrappe.automation.doctype.assignment_rule.assignment_rule.update_due_dateâ, âfrappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_typeâ], âafter_renameâ: [âfrappe.desk.notifications.clear_doctype_notificationsâ], âon_cancelâ: [âfrappe.desk.notifications.clear_doctype_notificationsâ, âfrappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actionsâ, âfrappe.automation.doctype.assignment_rule.assignment_rule.applyâ], âon_trashâ: [âfrappe.desk.notifications.clear_doctype_notificationsâ, âfrappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actionsâ], âon_update_after_submitâ: ['frappe.workflow.doctype.workflow_action.workflow_action.process_wâŚ
handler = âfrappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_typeâ
composed = <function Document.hook..compose..runner at 0x7a49ded11da0>
compose = <function Document.hook..compose at 0x7a49ded11ee0>
f = <function Document.run_method..fn at 0x7a49ded11b20>
File â/home/insights/insights/apps/frappe/frappe/model/document.pyâ, line 1304, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
self = <DocType: Insights Alert>
method = âon_updateâ
args = ()
kwargs = {}
add_to_return_value = <function Document.hook..add_to_return_value at 0x7a49ded11d00>
fn = <function Document.run_method..fn at 0x7a49ded11b20>
hooks = (<function build_domain_restriced_doctype_cache at 0x7a49e042d080>, <function clear_doctype_notifications at 0x7a49ddf51580>, <function process_workflow_actions at 0x7a49d1ff07c0>, <function attach_files_to_document at 0x7a49decb31a0>, <function apply at 0x7a49d1ff3420>, <function update_due_date at 0x7a49d1ff34c0>, <function apply_permissions_for_non_standard_user_type at 0x7a49d1e38b80>)
File â/home/insights/insights/apps/frappe/frappe/model/document.pyâ, line 959, in fn
return method_object(*args, **kwargs)
self = <DocType: Insights Alert>
args = ()
kwargs = {}
method_object = <bound method DocType.on_update of <DocType: Insights Alert>>
method = âon_updateâ
File â/home/insights/insights/apps/frappe/frappe/core/doctype/doctype/doctype.pyâ, line 531, in on_update
self.run_module_method(âon_doctype_updateâ)
self = <DocType: Insights Alert>
allow_doctype_export = False
File â/home/insights/insights/apps/frappe/frappe/core/doctype/doctype/doctype.pyâ, line 629, in run_module_method
module = load_doctype_module(self.name, self.module)
self = <DocType: Insights Alert>
method = âon_doctype_updateâ
load_doctype_module = <function load_doctype_module at 0x7a49df1dbd80>
File â/home/insights/insights/apps/frappe/frappe/modules/utils.pyâ, line 254, in load_doctype_module
raise ImportError(msg) from e
doctype = âInsights Alertâ
module = âInsightsâ
prefix = ââ
suffix = ââ
app = âinsightsâ
key = (âinsightsâ, âInsights Alertâ, ââ, ââ)
module_name = âinsights.insights.doctype.insights_alert.insights_alertâ
msg = âModule import failed for Insights Alert, the DocType youâre trying to open might be deleted.
Error: No module named âurllib3.contrib.appengineââ
builtins.ImportError: Module import failed for Insights Alert, the DocType youâre trying to open might be deleted.
Error: No module named âurllib3.contrib.appengineâ