Insights Installation error

I have installed frappe version 15 in my local ubuntu server
installed the insights app using command

bench get-app GitHub - frappe/insights: Open source analytics / business intelligence tool (BI)
bench --site site-name install-app insights

it went good but when opened site in browser it shown page insights not found

and when i hit url
ip:8000/insights
it showing internal server error

uninstall/re-install

also clear cache and do full uninstallation

doing the same
will update you if got any error

Sure, thanks and what about the installation query you asked earlier you resolved that ?

done the process again
even rebuild the server and done fresh installation but it again the same

$ bench version
frappe 15.29.1
insights 1.1.3

showing this just after setup completed

these are the installed apps

Try Running This Commands

bench --site [sitename] install-app insights --force
(bench must be running)

bench migrate
(bench must be running)

Stop Bench

bench clear-cache

Start Bench

do i try on frappe v14
as i tried 6-7 times on latest version 15

app installation is getting successful
migrate command is giving error

can you add error screen shot here?

Sorry but i cannot provide the ss as i have reset the server to new state to retry the installation

but as i remember it was giving some file not found error

installed when done with version 14 but not installing in v15

Trying it on a completely new bench setup and new server

output of
bench --site site-name install-app insights --force

$ bench --site nginsights.realgroup.org install-app insights --force

Installing insights…
Updating DocTypes for insights : [=========== ] 29%An error occurred while installing insights: Module import failed for Insights Alert, the DocType you’re trying to open might be deleted.
Error: No module named ‘urllib3.contrib.appengine’
Traceback with variables (most recent call last):
File “apps/frappe/frappe/commands/site.py”, line 445, in install_app
_install_app(app, verbose=context.verbose, force=force)
context = {‘sites’: [‘nginsights.realgroup.org’], ‘force’: False, ‘verbose’: False, ‘profile’: False}
apps = (‘insights’,)
force = True
_install_app = <function install_app at 0x79ba8a969da0>
filelock = <function filelock at 0x79ba8a94f6a0>
exit_code = 0
site = ‘nginsights.realgroup.org’
app = ‘insights’
err = ImportError(“Module import failed for Insights Alert, the DocType you’re trying to open might be deleted.
Error: No module named ‘urllib3.contrib.appengine’”)
File “apps/frappe/frappe/installer.py”, line 301, in install_app
sync_for(name, force=force, reset_permissions=True)
name = ‘insights’
verbose = False
set_as_patched = True
force = True
sync_jobs = <function sync_jobs at 0x79ba890f59e0>
sync_for = <function sync_for at 0x79ba890f67a0>
sync_customizations = <function sync_customizations at 0x79ba8a92c0e0>
sync_fixtures = <function sync_fixtures at 0x79ba890f6ac0>
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’: [‘1.1.3’], ‘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’]}, ‘scheduler_events’: {‘all’: [‘insights.insights.doctype.insights_alert.insights_alert.send_alerts’]}, ‘setup_wizard_requires’: [‘assets/insights/js/setup_wizard.js’], ‘setup_wizard_stages’: [‘insights.setup.setup_wizard.get_setup_stages’], 'websi…
installed_apps = [‘frappe’]
File “apps/frappe/frappe/model/sync.py”, line 111, in sync_for
import_file_by_path(
app_name = ‘insights’
force = True
reset_permissions = True
files = [‘apps/insights/insights/insights/doctype/insights_query_variable/insights_query_variable.json’, ‘apps/insights/insights/insights/doctype/insights_table_import/insights_table_import.json’, ‘apps/insights/insights/insights/doctype/insights_query_chart/insights_query_chart.json’, ‘apps/insights/insights/insights/doctype/insights_query/insights_query.json’, ‘apps/insights/insights/insights/doctype/insights_query_execution_log/insights_query_execution_log.json’, ‘apps/insights/insights/insights/doctype/insights_query_column/insights_query_column.json’, ‘apps/insights/insights/insights/doctype/insights_notebook/insights_notebook.json’, ‘apps/insights/insights/insights/doctype/insights_alert/insights_alert.json’, ‘apps/insights/insights/insights/doctype/insights_team_member/insig…
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 = True
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 = None
is_db_timestamp_latest = 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 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: o04g9nokk2 parent=Insights Alert>
File “apps/frappe/frappe/model/document.py”, line 1128, in run_post_save_methods
self.run_method(“on_update”)
self = <DocType: Insights Alert>
File “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 0x79ba7a2087c0>
File “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 0x79ba8a90b060>, <function clear_doctype_notifications at 0x79ba89632b60>, <function process_workflow_actions at 0x79ba7c465bc0>, <function attach_files_to_document at 0x79ba89554fe0>, <function apply at 0x79ba7c4b0860>, <function update_due_date at 0x79ba7c4b0900>, <function apply_permissions_for_non_standard_user_type at 0x79ba7c4b1f80>]
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 0x79ba7a208900>
compose = <function Document.hook..compose at 0x79ba7a208ae0>
f = <function Document.run_method..fn at 0x79ba7a2087c0>
File “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 0x79ba7a2089a0>
fn = <function Document.run_method..fn at 0x79ba7a2087c0>
hooks = (<function build_domain_restriced_doctype_cache at 0x79ba8a90b060>, <function clear_doctype_notifications at 0x79ba89632b60>, <function process_workflow_actions at 0x79ba7c465bc0>, <function attach_files_to_document at 0x79ba89554fe0>, <function apply at 0x79ba7c4b0860>, <function update_due_date at 0x79ba7c4b0900>, <function apply_permissions_for_non_standard_user_type at 0x79ba7c4b1f80>)
File “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 “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 “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 0x79ba8a92c720>
File “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 = ********
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’

which erp and python version you are using ?

only frappe is installed
do I need to install erpnext also ?

$ bench version
frappe 15.29.2
insights 1.1.3

python 3.12

$ python -V
Python 3.12.3

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’

try with python 3.11

Worked on 3.11
Thanks for your help

1 Like

You are welcome :slight_smile:

same error No module named 'urllib3.contrib.appengine in ubuntu version 24.04 lts
not installapp press