On bench install-app insights getting following error.
Error: No module named 'urllib3.contrib.appengine'
Traceback with variables (most recent call last):
File "apps/frappe/frappe/commands/site.py", line 486, in install_app
_install_app(app, verbose=context.verbose, force=force)
context = {'sites': ['****'], 'force': False, 'verbose': False, 'profile': False}
apps = ('insights',)
force = False
_install_app = <function install_app at 0xfdd4d22f7380>
filelock = <function filelock at 0xfdd4d32b5300>
exit_code = 0
site = '****'
app = 'insights'
err = ImportError("Module import failed for Insights Alert, the DocType you're trying to open might be deleted.\nError: No module named 'urllib3.contrib.appengine'")
File "apps/frappe/frappe/installer.py", line 316, in install_app
sync_for(name, force=force, reset_permissions=True)
name = 'insights'
verbose = False
set_as_patched = True
force = False
sync_jobs = <function sync_jobs at 0xfdd4d17e07c0>
sync_for = <function sync_for at 0xfdd4d17e14e0>
sync_customizations = <function sync_customizations at 0xfdd4d32e80e0>
sync_fixtures = <function sync_fixtures at 0xfdd4d17e1800>
app_hooks = {'app_color': ['grey'], 'app_description': ['Powerful Reporting Tool for Frappe Apps'], 'app_email': ['hello@frappe.io'], 'app_icon': ['octicon octicon-file-directory'], 'app_license': ['GNU GPLv3'], 'app_name': ['insights'], 'app_publisher': ['Frappe Technologies Pvt. Ltd.'], 'app_title': ['Frappe Insights'], 'app_version': ['2.2.9'], 'before_tests': ['insights.tests.utils.before_tests'], 'fixtures': [{'dt': 'Insights Data Source', 'filters': {'name': ('in', ['Site DB', 'Query Store'])}}], 'has_permission': {'Insights Data Source': ['insights.overrides.has_permission'], 'Insights Table': ['insights.overrides.has_permission'], 'Insights Query': ['insights.overrides.has_permission'], 'Insights Dashboard': ['insights.overrides.has_permission']}, 'page_renderer': ['insights.utils.InsightsPageRenderer'], 'scheduler_events': {'all': ['insights.insights.doctype.insights_alert.insights_alert.send_alerts']}, 'setup_wizard_requires': ['assets/insights/js/setup_wizard.js'], 'setup_wizard_stages'...
installed_apps = ['frappe', 'erpnext', 'ecommerce_integrations', 'telephony', 'hrms', 'exotel_integration']
File "apps/frappe/frappe/model/sync.py", line 112, in sync_for
import_file_by_path(
app_name = 'insights'
force = False
reset_permissions = True
files = ['apps/insights/insights/insights/doctype/insights_notebook/insights_notebook.json', 'apps/insights/insights/insights/doctype/insights_query_table/insights_query_table.json', 'apps/insights/insights/insights/doctype/insights_table/insights_table.json', 'apps/insights/insights/insights/doctype/insights_query_execution_log/insights_query_execution_log.json', 'apps/insights/insights/insights/doctype/insights_resource_permission/insights_resource_permission.json', 'apps/insights/insights/insights/doctype/insights_query_column/insights_query_column.json', 'apps/insights/insights/insights/doctype/insights_team/insights_team.json', 'apps/insights/insights/insights/doctype/insights_alert/insights_alert.json', 'apps/insights/insi...
module_name = 'insights'
folder = 'apps/insights/insights/insights'
l = 24
i = 7
doc_path = 'apps/insights/insights/insights/doctype/insights_alert/insights_alert.json'
File "apps/frappe/frappe/modules/import_file.py", line 146, in import_file_by_path
import_doc(
path = 'apps/insights/insights/insights/doctype/insights_alert/insights_alert.json'
force = False
data_import = False
pre_process = None
ignore_version = True
reset_permissions = True
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(2025, 11, 21, 2, 6, 43, 694887)
is_db_timestamp_latest = True
stored_hash = None
File "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 = True
path = 'apps/insights/insights/insights/doctype/insights_alert/insights_alert.json'
controller = <class 'frappe.core.doctype.doctype.doctype.DocType'>
doc = <DocType: Insights Alert>
File "apps/frappe/frappe/model/document.py", line 334, 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: orc2p5vr11 parent=Insights Alert>
File "apps/frappe/frappe/model/document.py", line 1177, in run_post_save_methods
self.run_method("on_update")
self = <DocType: Insights Alert>
File "apps/frappe/frappe/model/document.py", line 1011, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
self = <DocType: Insights Alert>
method = 'on_update'
args = ()
kwargs = {}
fn = <function Document.run_method.<locals>.fn at 0xfdd4c98c1080>
File "apps/frappe/frappe/model/document.py", line 1371, in composer
return composed(self, method, *args, **kwargs)
self = <DocType: Insights Alert>
args = ()
kwargs = {}
hooks = [<function build_domain_restriced_doctype_cache at 0xfdd4d33142c0>, <function clear_doctype_notifications at 0xfdd4c99cd800>, <function process_workflow_actions at 0xfdd4c99f5e40>, <function attach_files_to_document at 0xfdd4d3e339c0>, <function apply at 0xfdd4c9a08cc0>, <function update_due_date at 0xfdd4c9a08d60>, <function apply_permissions_for_non_standard_user_type at 0xfdd4d4a30180>, <function update_doc_index at 0xfdd4ca023ec0>]
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', 'frappe.search.sqlite_search.update_doc_index'], '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', 'frappe.search.sqlite_search.delete_doc_index'...
handler = 'frappe.search.sqlite_search.update_doc_index'
composed = <function Document.hook.<locals>.compose.<locals>.runner at 0xfdd4c98c1120>
compose = <function Document.hook.<locals>.compose at 0xfdd4c98c0fe0>
f = <function Document.run_method.<locals>.fn at 0xfdd4c98c1080>
File "apps/frappe/frappe/model/document.py", line 1353, 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.<locals>.add_to_return_value at 0xfdd4c98c0f40>
fn = <function Document.run_method.<locals>.fn at 0xfdd4c98c1080>
hooks = (<function build_domain_restriced_doctype_cache at 0xfdd4d33142c0>, <function clear_doctype_notifications at 0xfdd4c99cd800>, <function process_workflow_actions at 0xfdd4c99f5e40>, <function attach_files_to_document at 0xfdd4d3e339c0>, <function apply at 0xfdd4c9a08cc0>, <function update_due_date at 0xfdd4c9a08d60>, <function apply_permissions_for_non_standard_user_type at 0xfdd4d4a30180>, <function update_doc_index at 0xfdd4ca023ec0>)
File "apps/frappe/frappe/model/document.py", line 1008, 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 "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 536, in on_update
self.run_module_method("on_doctype_update")
self = <DocType: Insights Alert>
allow_doctype_export = False
File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 634, 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 0xfdd4d32e8720>
File "apps/frappe/frappe/modules/utils.py", line 259, in load_doctype_module
raise ImportError(msg) from e
doctype = 'Insights Alert'
module = 'Insights'
prefix = ''
suffix = ''
app = 'insights'
key = ********
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.\nError: 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'
Existing apps:
frappe 15.86.0 version-15
erpnext 15.84.0 version-15
ecommerce_integrations 1.17.0 develop
telephony 0.0.1 develop
hrms 15.52.0 version-15
exotel_integration 0.0.1 develop