Error installing Helpdek on site when CRM is installed

Installed CRM using this

Installed ssl using let’sencrypt

now installing frappe helpdesk
bench get-app helpdesk --branch main
bench --site dev.mydomain.com --install-app helpdesk

Installing helpdesk...
Updating DocTypes for helpdesk      : [========================================] 100%
An error occurred while installing helpdesk: No module named 'frappe.utils.modules'
Traceback with variables (most recent call last):
  File "apps/frappe/frappe/commands/site.py", line 484, in install_app
    _install_app(app, verbose=context.verbose, force=force)
      context = {'sites': ['dev.mydomain.com'], 'force': False, 'verbose': False, 'profile': False}
      apps = ('helpdesk',)
      force = False
      _install_app = <function install_app at 0x75481ae1efc0>
      filelock = <function filelock at 0x75481b0deac0>
      exit_code = 0
      site = 'dev.mydomain.com'
      app = 'helpdesk'
      err = ModuleNotFoundError("No module named 'frappe.utils.modules'")
  File "apps/frappe/frappe/installer.py", line 326, in install_app
    frappe.get_attr(after_install)()
      name = 'helpdesk'
      verbose = False
      set_as_patched = True
      force = False
      sync_jobs = <function sync_jobs at 0x75481a1c39c0>
      sync_for = <function sync_for at 0x75481a1d4680>
      sync_customizations = <function sync_customizations at 0x75481b264ea0>
      sync_fixtures = <function sync_fixtures at 0x75481a1d49a0>
      app_hooks = {'add_to_apps_screen': [{'name': 'helpdesk', 'logo': '/assets/helpdesk/desk/favicon.svg', 'title': 'Helpdesk', 'route': '/helpdesk', 'has_permission': 'helpdesk.api.permission.has_app_permission'}], 'after_install': ['helpdesk.setup.install.after_install'], 'after_migrate': ['helpdesk.search.build_index_in_background', 'helpdesk.search.download_corpus'], 'app_color': ['grey'], 'app_description': ['Customer Service Software'], 'app_email': ['hello@frappe.io'], 'app_icon': ['octicon octicon-file-directory'], 'app_license': ['AGPLv3'], 'app_name': ['helpdesk'], 'app_publisher': ['Frappe Technologies'], 'app_title': ['Helpdesk'], 'doc_events': {'Contact': {'before_insert': ['helpdesk.helpdesk.hooks.contact.before_insert']}, 'Assignment Rule': {'on_trash': ['helpdesk.extends.assignment_rule.on_assignment_rule_trash']}}, 'has_permission': {'HD Ticket': ['helpdesk.helpdesk.doctype.hd_ticket.hd_ticket.has_permission']}, 'ignore_links_on_delete': ['HD Notification', 'HD Ticket Comment'], 'overr...
      installed_apps = ['frappe', 'crm']
      after_install = 'helpdesk.setup.install.after_install'
  File "apps/helpdesk/helpdesk/setup/install.py", line 28, in after_install
    create_welcome_ticket()
  File "apps/helpdesk/helpdesk/setup/welcome_ticket.py", line 26, in create_welcome_ticket
    create_contact()
  File "apps/helpdesk/helpdesk/setup/welcome_ticket.py", line 57, in create_contact
    ).insert()
  File "apps/frappe/frappe/model/document.py", line 309, in insert
    self.run_before_save_methods()
      self = <CustomContact: John Doe>
      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 1136, in run_before_save_methods
    self.run_method("validate")
      self = <CustomContact: John Doe>
  File "apps/frappe/frappe/model/document.py", line 1007, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
      self = <CustomContact: John Doe>
      method = 'validate'
      args = ()
      kwargs = {}
      fn = <function Document.run_method.<locals>.fn at 0x754817a64540>
  File "apps/frappe/frappe/model/document.py", line 1364, in composer
    hooks.append(frappe.get_attr(handler))
      self = <CustomContact: John Doe>
      args = ()
      kwargs = {}
      hooks = []
      method = 'validate'
      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 = 'crm.api.contact.validate'
      compose = <function Document.hook.<locals>.compose at 0x754817a644a0>
      f = <function Document.run_method.<locals>.fn at 0x754817a64540>
  File "apps/frappe/frappe/__init__.py", line 1744, in get_attr
    return getattr(get_module(modulename), methodname)
      method_string = 'crm.api.contact.validate'
      app_name = 'crm'
      modulename = 'crm.api.contact'
      methodname = 'validate'
  File "apps/frappe/frappe/__init__.py", line 1454, in get_module
    return importlib.import_module(modulename)
      modulename = 'crm.api.contact'
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
      name = 'crm.api.contact'
      package = None
      level = 0
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
      name = 'crm.api.contact'
      package = None
      level = 0
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
      name = 'crm.api.contact'
      import_ = <function _gcd_import at 0x75481d5580e0>
      module = <exception while printing> Traceback (most recent call last):
          File "env/lib/python3.12/site-packages/traceback_with_variables/core.py", line 222, in _to_cropped_str
            raw = print_(obj)
                  ^^^^^^^^^^^
          File "apps/frappe/frappe/utils/__init__.py", line 328, in dict_printer
            if key in v:
               ^^^^^^^^
        TypeError: argument of type 'object' is not iterable

  File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
      name = 'crm.api.contact'
      import_ = <function _gcd_import at 0x75481d5580e0>
      path = None
      parent = 'crm.api'
      parent_spec = None
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
      f = <function _gcd_import at 0x75481d5580e0>
      args = ('crm.api',)
      kwds = {}
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
      name = 'crm.api'
      package = None
      level = 0
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
      name = 'crm.api'
      import_ = <function _gcd_import at 0x75481d5580e0>
      module = <exception while printing> Traceback (most recent call last):
          File "env/lib/python3.12/site-packages/traceback_with_variables/core.py", line 222, in _to_cropped_str
            raw = print_(obj)
                  ^^^^^^^^^^^
          File "apps/frappe/frappe/utils/__init__.py", line 328, in dict_printer
            if key in v:
               ^^^^^^^^
        TypeError: argument of type 'object' is not iterable

  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
      name = 'crm.api'
      import_ = <function _gcd_import at 0x75481d5580e0>
      path = ['apps/crm/crm']
      parent = 'crm'
      parent_spec = ModuleSpec(name='crm', loader=<_frozen_importlib_external.SourceFileLoader object at 0x75481b360860>, origin='apps/crm/crm/__init__.py', submodule_search_locations=['apps/crm/crm'])
      parent_module = <module 'crm' from 'apps/crm/crm/__init__.py'>
      child = 'api'
      spec = ModuleSpec(name='crm.api', loader=<_frozen_importlib_external.SourceFileLoader object at 0x754817f82870>, origin='apps/crm/crm/api/__init__.py', submodule_search_locations=['apps/crm/crm/api'])
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
      spec = ModuleSpec(name='crm.api', loader=<_frozen_importlib_external.SourceFileLoader object at 0x754817f82870>, origin='apps/crm/crm/api/__init__.py', submodule_search_locations=['apps/crm/crm/api'])
      module = <module 'crm.api' from 'apps/crm/crm/api/__init__.py'>
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
      self = <_frozen_importlib_external.SourceFileLoader object at 0x754817f82870>
      module = <module 'crm.api' from 'apps/crm/crm/api/__init__.py'>
      code = <code object <module> at 0x3391700, file "apps/crm/crm/api/__init__.py", line 1>
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
      f = <built-in function exec>
      args = (<code object <module> at 0x3391700, file "apps/crm/crm/api/__init__.py", line 1>, {'__name__': 'crm.api', '__doc__': None, '__package__': 'crm.api', '__loader__': <_frozen_importlib_external.SourceFileLoader object at 0x754817f82870>, '__spec__': ModuleSpec(name='crm.api', loader=<_frozen_importlib_external.SourceFileLoader object at 0x754817f82870>, origin='apps/crm/crm/api/__init__.py', submodule_search_locations=['apps/crm/crm/api']), '__path__': ['apps/crm/crm/api'], '__file__': 'apps/crm/crm/api/__init__.py', '__cached__': 'apps/crm/crm/api/__pycache__/__init__.cpython-312.pyc', '__builtins__': {'__name__': 'builtins', '__doc__': "Built-in functions, types, exceptions, and other objects.\n\nThis module provides direct access to all 'built-in'\nidentifiers of Python; for example, builtins.len is\nthe full name for the built-in ...
      kwds = {}
  File "apps/crm/crm/api/__init__.py", line 6, in <module>
    from frappe.utils.modules import get_modules_from_all_apps_for_user
      __name__ = 'crm.api'
      __doc__ = None
      __package__ = 'crm.api'
      __loader__ = <_frozen_importlib_external.SourceFileLoader object at 0x754817f82870>
      __spec__ = ModuleSpec(name='crm.api', loader=<_frozen_importlib_external.SourceFileLoader object at 0x754817f82870>, origin='apps/crm/crm/api/__init__.py', submodule_search_locations=['apps/crm/crm/api'])
      __path__ = ['apps/crm/crm/api']
      __file__ = 'apps/crm/crm/api/__init__.py'
      __cached__ = 'apps/crm/crm/api/__pycache__/__init__.cpython-312.pyc'
      __builtins__ = {'__name__': 'builtins', '__doc__': "Built-in functions, types, exceptions, and other objects.\n\nThis module provides direct access to all 'built-in'\nidentifiers of Python; for example, builtins.len is\nthe full name for the built-in function len().\n\nThis module is not normally accessed explicitly by most\napplications, but can be useful in modules that provide\nobjects with the same name as a built-in value, but in\nwhich the built-in of that name is also needed.", '__package__': '', '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), '__build_class__': <built-in function __build_class__>, '__import__': <built-in function __import__>, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'breakpoint': <built-in function breakpoint>, 'callable': <built-in f...
      frappe = <module 'frappe' from 'apps/frappe/frappe/__init__.py'>
      BeautifulSoup = <class 'bs4.BeautifulSoup'>
      get_max_file_size = <function get_max_file_size at 0x754818c74400>
      get_all_translations = <function get_all_translations at 0x7548184c1a80>
      cstr = <function cstr at 0x75481bbf23e0>
      split_emails = <function split_emails at 0x75481bbf62a0>
      validate_email_address = <function validate_email_address at 0x75481bbf6200>
builtins.ModuleNotFoundError: No module named 'frappe.utils.modules'