Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

India Compliance version-15 installation is failing #2255

Closed
1 task done
Pankajvcm244 opened this issue Jun 17, 2024 · 2 comments
Closed
1 task done

India Compliance version-15 installation is failing #2255

Pankajvcm244 opened this issue Jun 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Pankajvcm244
Copy link

Information about bug

I am using Frappe site, i ran two commands
bench get-app --branch version-15 https://github.com/resilient-tech/india-compliance.git
bench --site prod1.com install-app india_compliance

ERPNext: v15.27.4 (version-15)
Frappe Framework: v15.29.2 (version-15)
India Compliance: v15.8.1 (version-15)

It gives below error. It seems some issue with Doc type Bill of entry.

I have another EC2 instance where India compliance is working fine.
ERPNext: v15.27.0 (version-15)
Frappe Framework: v15.29.1 (version-15)
India Compliance: v15.7.5 (version-15)

Version

ERPNext: v15.27.4 (version-15)
Frappe Framework: v15.29.2 (version-15)
India Compliance: v15.8.1 (version-15)

Relevant log output / Stack trace / Full Error Message.

(myenv) ubuntu@ip-172-31-9-155:~/frappe-bench$ bench --site prod1.com install-app india_compliance                              bench --site prod1.com install-app india_compliance
App erpnext already installed


Installing india_compliance...
Installation for India Compliance failed due to an error. Please try re-installing the app or report the issue on https://github.com/resilient-tech/india-compliance/issues/new if not resolved.
An error occurred while installing india_compliance: Could not find DocType: Bill of Entry
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': ['prod1.com'], 'force': False, 'verbose': False, 'profile': False}
      apps = ('india_compliance',)
      force = False
      _install_app = <function install_app at 0x70dace8e1760>
      filelock = <function filelock at 0x70dace8deb60>
      exit_code = 0
      site = 'prod1.com'
      app = 'india_compliance'
      err = LinkValidationError('Could not find DocType: Bill of Entry')
  File "apps/frappe/frappe/installer.py", line 311, in install_app
    frappe.get_attr(after_install)()
      name = 'india_compliance'
      verbose = False
      set_as_patched = True
      force = False
      sync_jobs = <function sync_jobs at 0x70dacd452a20>
      sync_for = <function sync_for at 0x70dacd453880>
      sync_customizations = <function sync_customizations at 0x70dace8731a0>
      sync_fixtures = <function sync_fixtures at 0x70dacd453ba0>
      app_hooks = {'accounting_dimension_doctypes': ['Bill of Entry', 'Bill of Entry Item'], 'after_app_install': ['india_compliance.install.after_app_install'], 'after_install': ['india_compliance.install.after_install'], 'after_migrate': ['india_compliance.audit_trail.setup.after_migrate'], 'app_color': ['grey'], 'app_description': ['ERPNext app to simplify compliance with Indian Rules and Regulations'], 'app_email': ['hello@indiacompliance.app'], 'app_icon': ['octicon octicon-file-directory'], 'app_include_js': ['india_compliance.bundle.js'], 'app_license': ['GNU General Public License (v3)'], 'app_name': ['india_compliance'], 'app_publisher': ['Resilient Tech'], 'app_title': ['India Compliance'], 'audit_trail_doctypes': ['Accounts Settings', 'Dunning', 'Invoice Discounting', 'Journal Entry', 'Payment Entry', 'Period Closing Voucher', 'Process Deferred Accounting', 'Purchase Invoice', 'Sales Invoice', 'Asset', 'Asset Capitalization', 'Asset Repair', 'Delivery Note', 'Landed Cost Voucher', 'Purchase R...
      installed_apps = ['frappe', 'erpnext']
      app = 'frappe/erpnext'
      required_app = 'erpnext'
      before_install = 'india_compliance.patches.check_version_compatibility.execute'
      out = None
      after_install = 'india_compliance.install.after_install'
  File "apps/india_compliance/india_compliance/install.py", line 73, in after_install
    raise e
  File "apps/india_compliance/india_compliance/install.py", line 52, in after_install
    setup_audit_trail()
  File "apps/india_compliance/india_compliance/audit_trail/setup.py", line 15, in setup_fixtures
    create_property_setters_for_versioning()
  File "apps/india_compliance/india_compliance/audit_trail/setup.py", line 35, in create_property_setters_for_versioning
    property_setter.insert()
      doctype = 'Bill of Entry'
      property_setter_data = {'doctype_or_field': 'DocType', 'doc_type': 'Bill of Entry', 'property': 'track_changes', 'value': '1', 'property_type': 'Check', 'is_system_generated': 1}
      property_setter = <PropertySetter: unsaved>
  File "apps/frappe/frappe/model/document.py", line 283, in insert
    self._validate_links()
      self = <PropertySetter: unsaved>
      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 930, in _validate_links
    frappe.throw(_("Could not find {0}").format(msg), frappe.LinkValidationError)
      self = <PropertySetter: unsaved>
      invalid_links = [('doc_type', 'Bill of Entry', 'DocType: Bill of Entry')]
      cancelled_links = []
      msg = 'DocType: Bill of Entry'
  File "apps/frappe/frappe/__init__.py", line 645, in throw
    msgprint(
      msg = 'Could not find DocType: Bill of Entry'
      exc = <class 'frappe.exceptions.LinkValidationError'>
      title = None
      is_minimizable = False
      wide = False
      as_list = False
      primary_action = None
  File "apps/frappe/frappe/__init__.py", line 610, in msgprint
    _raise_exception()
      msg = 'Could not find DocType: Bill of Entry'
      title = None
      raise_exception = <class 'frappe.exceptions.LinkValidationError'>
      as_table = False
      as_list = False
      indicator = 'red'
      alert = False
      primary_action = None
      is_minimizable = False
      wide = False
      realtime = False
      sys = <module 'sys' (built-in)>
      _raise_exception = <function msgprint.<locals>._raise_exception at 0x70dacaf0d620>
      inspect = <module 'inspect' from '/usr/lib/python3.11/inspect.py'>
      out = {'message': 'Could not find DocType: Bill of Entry', 'title': 'Message', 'indicator': 'red', 'raise_exception': 1, '__frappe_exc_id': '68f7ca5052f721b3318c44bb94be94c68eb237ab3642dcded68c7123'}
  File "apps/frappe/frappe/__init__.py", line 561, in _raise_exception
    raise exc
      exc = LinkValidationError('Could not find DocType: Bill of Entry')
      inspect = <module 'inspect' from '/usr/lib/python3.11/inspect.py'>
      msg = 'Could not find DocType: Bill of Entry'
      out = {'message': 'Could not find DocType: Bill of Entry', 'title': 'Message', 'indicator': 'red', 'raise_exception': 1, '__frappe_exc_id': '68f7ca5052f721b3318c44bb94be94c68eb237ab3642dcded68c7123'}
      raise_exception = <class 'frappe.exceptions.LinkValidationError'>
frappe.exceptions.LinkValidationError: Could not find DocType: Bill of Entry

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Pankajvcm244 Pankajvcm244 added the bug Something isn't working label Jun 17, 2024
@Pankajvcm244
Copy link
Author

@vorasmit I am not using docker, just simple EC2 Ubantu server. older versions installation were smooth but India Compliance: v15.8.1 (version-15) installation is nightmare. It seems something is broken with Doc type Bill of entry. AFter installation my website also started giving errors, after removing India compliance app everything is fine again.

@vorasmit
Copy link
Collaborator

vorasmit commented Jun 19, 2024

We have test cases on each branch, which run only after successful installation. If this was the issue, many on FC would have faced the same, which is not the case.

https://github.com/resilient-tech/india-compliance/actions/runs/9564803631/job/26366361003

Steps used to install before running tests:
https://github.com/resilient-tech/india-compliance/blob/version-15-hotfix/.github/helper/install.sh

The issue you are facing suggests that Doctype was not created (in installation) for Bill of Entry and hence it raised the error while creating one property setter for the same. Hence the deduction, there is some issue with your installation.


When we close an issue, it's because it's not a genuine issue. We could be incorrect at times and you can keep your comments in the same issue. We can reopen the issue or communicate on the same issue to your satisfaction. It's not cool to keep creating new issues again or posting on other issues and is not in line with the contribution guidelines.

PS: Still having issues, discuss forum is a good place for getting help. You can get in touch with partners or developers from community for professional help if required. Best if you use Frappe Cloud.

@vorasmit vorasmit closed this as not planned Won't fix, can't repro, duplicate, stale Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants