frappe / insights

Open source analytics / business intelligence tool (BI)
https://frappe.io/insights
GNU Affero General Public License v3.0
436 stars 213 forks source link

Installtion issue on site in local environment #334

Closed vipul-kumar455 closed 4 hours ago

vipul-kumar455 commented 4 hours ago

I follow this step to install insights bench get-app https://github.com/frappe/insights.git bench --site dev.localhost install-app insights but getting this errror

`/workspace/development/frappe-bench$ bench --site dev.localhost install-app insights

Installing insights... Updating DocTypes for insights : [========================================] 100% An error occurred while installing insights: 'function' object has no attribute 'clear_cache' 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': ['dev.localhost'], 'force': False, 'verbose': False, 'profile': False} apps = ('insights',) force = False _install_app = <function install_app at 0x72434bd328e0> filelock = <function filelock at 0x72434bd2bc40> exit_code = 0 site = 'dev.localhost' app = 'insights' err = AttributeError("'function' object has no attribute 'clear_cache'") File "apps/frappe/frappe/installer.py", line 317, in install_app sync_fixtures(name) name = 'insights' verbose = False set_as_patched = True force = False sync_jobs = <function sync_jobs at 0x72434b14aac0> sync_for = <function sync_for at 0x72434b14b9c0> sync_customizations = <function sync_customizations at 0x72434bed7f60> sync_fixtures = <function sync_fixtures at 0x72434b14bd80> app_hooks = {'after_request': ['insights.insights.doctype.insights_data_source_v3.insights_data_source_v3.after_request'], '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'], 'before_request': ['insights.insights.doctype.insights_data_source_v3.insights_data_source_v3.before_request'], 'before_tests': ['insights.tests.utils.before_tests'], 'doc_events': {'User': {'on_change': ['insights.insights.doctype.insights_team.insights_team.update_admin_team']}}, 'export_python_type_annotations': [True], 'fixtures': [{'dt': 'Insights Data Source', 'filters': {'name': ('in', ['Site DB', 'Query Store'])}}, {'dt': 'Insights Data Source v3', 'filters': {'name': ('in', ['Site DB'])}}, {'dt': 'Insights Team', 'filters': {'name': ('in', ['Admin'])}}], 'has_per... installed_apps = ['frappe', 'erpnext', 'hrms', 'india_compliance', 'frappe_whatsapp', 'print_designer', 'lms', 'helpdesk'] fn = 'print_designer.install.after_app_install' File "apps/frappe/frappe/utils/fixtures.py", line 22, in sync_fixtures import_fixtures(app) app = 'insights' apps = ['insights'] File "apps/frappe/frappe/utils/fixtures.py", line 41, in import_fixtures import_doc(file_path) app = 'insights' fixtures_path = 'apps/insights/insights/fixtures' fixture_files = ['insights_data_source.json', 'insights_notebook.json', 'insights_team.json', 'role.json', 'insights_data_source_v3.json'] fname = 'insights_team.json' file_path = 'apps/insights/insights/fixtures/insights_team.json' File "apps/frappe/frappe/core/doctype/data_import/data_import.py", line 265, in import_doc import_file_by_path( path = 'apps/insights/insights/fixtures/insights_team.json' pre_process = None files = ['apps/insights/insights/fixtures/insights_team.json'] f = 'apps/insights/insights/fixtures/insights_team.json' File "apps/frappe/frappe/modules/import_file.py", line 146, in import_file_by_path import_doc( path = 'apps/insights/insights/fixtures/insights_team.json' force = True data_import = True pre_process = None ignore_version = None reset_permissions = True docs = [{'name': 'Admin', 'owner': 'Administrator', 'creation': '2024-09-18 15:22:03.781109', 'modified': '2024-09-18 15:22:03.781109', 'modified_by': 'Administrator', 'docstatus': 0, 'idx': 0, 'team_name': 'Admin', 'doctype': 'Insights Team', 'team_permissions': [], 'team_members': [], 'islocal': 1}] calculated_hash = '3397955002d10c5a50de717055057dfc' doc = {'name': 'Admin', 'owner': 'Administrator', 'creation': '2024-09-18 15:22:03.781109', 'modified': '2024-09-18 15:22:03.781109', 'modified_by': 'Administrator', 'docstatus': 0, 'idx': 0, 'team_name': 'Admin', 'doctype': 'Insights Team', 'team_permissions': [], 'team_members': [], '__islocal': 1} 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 = {'name': 'Admin', 'owner': 'Administrator', 'creation': '2024-09-18 15:22:03.781109', 'modified': '2024-09-18 15:22:03.781109', 'modified_by': 'Administrator', 'docstatus': 0, 'idx': 0, 'team_name': 'Admin', 'doctype': 'Insights Team', 'team_permissions': [], 'team_members': [], 'islocal': 1} data_import = True pre_process = None ignore_version = None reset_permissions = True path = 'apps/insights/insights/fixtures/insights_team.json' controller = <class 'insights.insights.doctype.insights_team.insights_team.InsightsTeam'> doc = File "apps/frappe/frappe/model/document.py", line 315, in insert self.run_post_save_methods() self = ignore_permissions = None ignore_links = None ignore_if_duplicate = False ignore_mandatory = None set_name = None set_child_names = True File "apps/frappe/frappe/model/document.py", line 1147, in run_post_save_methods self.run_method("on_change") self = File "apps/frappe/frappe/model/document.py", line 962, in run_method out = Document.hook(fn)(self, *args, kwargs) self = method = 'on_change' args = () kwargs = {} fn = <function Document.run_method..fn at 0x7243197a94e0> File "apps/frappe/frappe/model/document.py", line 1322, in composer return composed(self, method, *args, kwargs) self = args = () kwargs = {} hooks = [<function process_energy_points at 0x724329d2cae0>, <function evaluate_milestone at 0x724329d7c180>, <function process_badges at 0x724329d7c9a0>] method = 'on_change' 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_whatsapp.utils.run_server_script_for_doc_event'], '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', 'frappe_whatsapp.utils.run_server_script_for_doc_event'], 'on_trash': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process... handler = 'lms.lms.doctype.lms_badge.lms_badge.process_badges' composed = <function Document.hook..compose..runner at 0x7243197a91c0> compose = <function Document.hook..compose at 0x7243197a9580> f = <function Document.run_method..fn at 0x7243197a94e0> File "apps/frappe/frappe/model/document.py", line 1304, in runner add_to_return_value(self, fn(self, args, kwargs)) self = method = 'on_change' args = () kwargs = {} add_to_return_value = <function Document.hook..add_to_return_value at 0x7243197a9620> fn = <function Document.run_method..fn at 0x7243197a94e0> hooks = (<function process_energy_points at 0x724329d2cae0>, <function evaluate_milestone at 0x724329d7c180>, <function process_badges at 0x724329d7c9a0>) File "apps/frappe/frappe/model/document.py", line 959, in fn return method_object(*args, kwargs) self = args = () kwargs = {} method_object = <bound method InsightsTeam.on_change of > method = 'on_change' File "apps/insights/insights/insights/doctype/insights_team/insights_team.py", line 59, in on_change clear_cache() self = File "apps/insights/insights/insights/doctype/insights_team/insights_team.py", line 182, in clear_cache is_admin.clear_cache() builtins.AttributeError: 'function' object has no attribute 'clear_cache'`

Screenshot from 2024-10-27 18-53-25 Screenshot from 2024-10-27 18-53-25

nextchamp-saqib commented 4 hours ago

fixed. update and check if resolved