Closed ajiragroup closed 1 month ago
Hello. I have the same error in version 2.2.3 I am urging to run from Docker Custom Image
`bench install-app insights --force
Installing insights...
Updating DocTypes for insights : [============================== ] 75%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': ['insights'], 'force': False, 'verbose': False, 'profile': False}
apps = ('insights',)
force = True
_install_app = <function install_app at 0x7a68cb27b880>
filelock = <function filelock at 0x7a68cb278fe0>
exit_code = 0
site = 'insights'
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 0x7a68c9f0e700>
sync_for = <function sync_for at 0x7a68c9f0f4c0>
sync_customizations = <function sync_customizations at 0x7a68cb2399e0>
sync_fixtures = <function sync_fixtures at 0x7a68c9f0f7e0>
app_hooks = {'after_install': ['insights.setup.after_install'], '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.2'], 'before_tests': ['insights.tests.utils.before_tests'], 'fixtures': ['Insights Data Source'], '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'], 'website_route_rules...
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_column/insights_query_column.json', 'apps/insights/insights/insights/doctype/insights_team/insights_team.json', 'apps/insights/insights/insights/doctype/insights_query/insights_query.json', 'apps/insights/insights/insights/doctype/insights_notebook/insights_notebook.json', 'apps/insights/insights/insights/doctype/insights_query_transform/insights_query_transform.json', 'apps/insights/insights/insights/doctype/insights_query_variable/insights_query_variable.json', 'apps/insights/insights/insights/doctype/insights_table_column/insights_table_column.json', 'apps/insights/insights/insights/doctype/insights_chart/insights_chart.json', 'apps/insights/insights/insights/doctype/insights_settings/insights_set...
module_name = 'insights'
folder = 'apps/insights/insights/insights'
l = 24
i = 18
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 = datetime.datetime(2024, 5, 4, 12, 0, 5, 36831)
is_db_timestamp_latest = True
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 =
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'`
Got the following error while installation:
Installing insights... An error occurred while installing insights: Module import failed for Insights D ata Source, the DocType you're trying to open might be deleted. Error: No mo dule named 'frappe.core.doctype.insights_data_source' 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': ['example.com'], 'force': False, 'verbose': F alse, 'profile': False} apps = ('insights',) force = False _install_app = <function install_app at 0x7ff609f87760> filelock = <function filelock at 0x7ff609f87400> exit_code = 0 site = 'example.com' app = 'insights' err = ImportError("Module import failed for Insights Data Source, the DocT ype you're trying to open might be deleted. Error: No module named 'frappe.c ore.doctype.insights_data_source'") File "apps/frappe/frappe/installer.py", line 311, in install_app frappe.get_attr(after_install)() name = 'insights' verbose = False set_as_patched = True force = False sync_jobs = <function sync_jobs at 0x7ff608529900> sync_for = <function sync_for at 0x7ff60852a3b0> sync_customizations = <function sync_customizations at 0x7ff60a116320> sync_fixtures = <function sync_fixtures at 0x7ff60852a5f0> app_hooks = {'after_install': ['insights.setup.after_install'], 'app_color ': ['grey'], 'app_description': ['Powerful Reporting Tool for Frappe Apps'], 'ap p_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': ['Insi ghts Data Source'], 'has_permission': {'Insights Data Source': ['insights.overri des.has_permission'], 'Insights Table': ['insights.overrides.has_permission'], ' Insights Query': ['insights.overrides.has_permission'], 'Insights Dashboard': [' insights.overrides.has_permission']}, 'scheduler_events': {'all': ['insights.ins ights.doctype.insights_alert.insights_alert.send_alerts']}, 'setup_wizard_requir es': ['assets/insights/js/setup_wizard.js'], 'setup_wizard_stages': ['insights.s etup.setup_wizard.get_setup_stages'], 'website_route_rules... installed_apps = ['frappe', 'wiki', 'erpnext', 'crm'] after_install = 'insights.setup.after_install' File "apps/insights/insights/setup/init.py", line 12, in after_install sync_site_tables() File "apps/insights/insights/setup/init.py", line 20, in sync_site_tables create_site_db_data_source() File "apps/insights/insights/setup/init.py", line 32, in create_site_db_da ta_source frappe.get_doc(site_db).insert() data_source_fixture_path = 'apps/insights/insights/fixtures/insightsdata source.json' f = <_io.TextIOWrapper name='apps/insights/insights/fixtures/insights_data _source.json' mode='r' encoding='UTF-8'> site_db = {'doctype': 'Insights Data Source', 'is_site_db': 1, 'name': 'Si te DB', 'title': 'Site DB', 'status': 'Active', 'database_type': 'MariaDB', 'mod ified': '2022-01-01 00:01:00.000000', 'creation': '2022-01-01 00:01:00.000000'} File "apps/frappe/frappe/init.py", line 1286, in get_doc doc = frappe.model.document.get_doc(*args, kwargs) args = ({'doctype': 'Insights Data Source', 'is_site_db': 1, 'name': 'Site DB', 'title': 'Site DB', 'status': 'Active', 'database_type': 'MariaDB', 'modif ied': '2022-01-01 00:01:00.000000', 'creation': '2022-01-01 00:01:00.000000'},) kwargs = {} frappe = <module 'frappe' from 'apps/frappe/frappe/init.py'> File "apps/frappe/frappe/model/document.py", line 83, in get_doc controller = get_controller(doctype) args = ({'doctype': 'Insights Data Source', 'is_site_db': 1, 'name': 'Site DB', 'title': 'Site DB', 'status': 'Active', 'database_type': 'MariaDB', 'modif ied': '2022-01-01 00:01:00.000000', 'creation': '2022-01-01 00:01:00.000000'},) kwargs = {'doctype': 'Insights Data Source', 'is_site_db': 1, 'name': 'Sit e DB', 'title': 'Site DB', 'status': 'Active', 'database_type': 'MariaDB', 'modi fied': '2022-01-01 00:01:00.000000', 'creation': '2022-01-01 00:01:00.000000'} doctype = 'Insights Data Source' File "apps/frappe/frappe/model/base_document.py", line 70, in get_controller site_controllers[doctype] = import_controller(doctype) doctype = 'Insights Data Source' site_controllers = {'Module Def': <class 'frappe.core.doctype.module_def.m odule_def.ModuleDef'>, 'DocField': <class 'frappe.core.doctype.docfield.docfield .DocField'>, 'DocPerm': <class 'frappe.core.doctype.docperm.docperm.DocPerm'>, ' DocType Link': <class 'frappe.core.doctype.doctype_link.doctype_link.DocTypeLink '>, 'System Settings': <class 'frappe.core.doctype.system_settings.system_settin gs.SystemSettings'>, 'Notification Settings': <class 'frappe.desk.doctype.notifi cation_settings.notification_settings.NotificationSettings'>, 'DefaultValue': <c lass 'frappe.core.doctype.defaultvalue.defaultvalue.DefaultValue'>, 'Ledger Heal th Monitor': <class 'erpnext.accounts.doctype.ledger_health_monitor.ledger_healt h_monitor.LedgerHealthMonitor'>, 'Ledger Health Monitor Company': <class 'erpnex t.accounts.doctype.ledger_health_monitor_company.ledger_health_monitor_company.L edgerHealthMonitorCompany'>, 'Payment Reconciliation': <class 'erpnext.accounts. doctype.payment_reconciliation.payment_reconciliation.PaymentReco... File "apps/frappe/frappe/model/base_document.py", line 95, in import_controlle r module = load_doctype_module(doctype, module_name) doctype = 'Insights Data Source' Document = <class 'frappe.model.document.Document'> NestedSet = <class 'frappe.utils.nestedset.NestedSet'> module_name = 'Core' doctype_info = None module_path = None class_overrides = {'Address': ['erpnext.accounts.custom.address.ERPNextAdd ress'], 'Contact': ['crm.overrides.contact.CustomContact'], 'Email Template': [' crm.overrides.email_template.CustomEmailTemplate']} File "apps/frappe/frappe/modules/utils.py", line 254, in load_doctype_module raise ImportError(msg) from e doctype = 'Insights Data Source' module = 'Core' prefix = '' suffix = '' app = 'frappe' key = ** module_name = 'frappe.core.doctype.insights_data_source.insights_data_sour ce' msg = "Module import failed for Insights Data Source, the DocType you're t rying to open might be deleted. Error: No module named 'frappe.core.doctype. insights_data_source'" builtins.ImportError: Module import failed for Insights Data Source, the DocType you're trying to open might be deleted. Error: No module named 'frappe.core .doctype.insights_data_source'
I have pushed a fix
Please check if you can install it now. Make sure to pull the latest changes from the develop
branch
Got the following error while installation: