frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.78k stars 7.31k forks source link

India_compliance Installation Error #43251

Closed RajPW closed 1 month ago

RajPW commented 1 month ago

Information about bug

Docker using Success full installation erpnext and frappe version-15 in my windows server. pwd.yml.

And India compliance install my backend bench site successfull run but some modules are broken attach frappe forum discussion for this error invalid-depends-on-expression.

Next i try to install india_compliance my frontend bench sit show all css an js files are broken ref: [#40054 ]

Module

other

Version

frappe 15.40.6 erpnext 15.35.1 india_compliance 15.13.2 version-15

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

Traceback (most recent call last):
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/gunicorn/workers/gthread.py", line 282, in handle
2024-09-17 12:42:06     keepalive = self.handle_request(req, conn)
2024-09-17 12:42:06                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/gunicorn/workers/gthread.py", line 334, in handle_request
2024-09-17 12:42:06     respiter = self.wsgi(environ, resp.start_response)
2024-09-17 12:42:06                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 79, in application
2024-09-17 12:42:06     app(environ, start_response),
2024-09-17 12:42:06     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/werkzeug/wrappers/request.py", line 190, in application
2024-09-17 12:42:06     resp = f(*args[:-2] + (request,))
2024-09-17 12:42:06            ^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 132, in application
2024-09-17 12:42:06     response = handle_exception(e)
2024-09-17 12:42:06                ^^^^^^^^^^^^^^^^^^^
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 395, in handle_exception
2024-09-17 12:42:06     response = get_response("message", http_status_code=http_status_code)
2024-09-17 12:42:06                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/serve.py", line 28, in get_response
2024-09-17 12:42:06     response = ErrorPage(exception=e).render()
2024-09-17 12:42:06                ^^^^^^^^^^^^^^^^^^^^^^
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/error_page.py", line 7, in __init__
2024-09-17 12:42:06     super().__init__(path=path, http_status_code=http_status_code)
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 45, in __init__
2024-09-17 12:42:06     self.set_template_path()
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/apps/frappe/frappe/website/page_renderers/template_page.py", line 54, in set_template_path
2024-09-17 12:42:06     app_path = frappe.get_app_path(app)
2024-09-17 12:42:06                ^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1512, in get_app_path
2024-09-17 12:42:06     return get_pymodule_path(app_name, *joins)
2024-09-17 12:42:06            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1542, in get_pymodule_path
2024-09-17 12:42:06     return abspath(join(dirname(get_module(scrub(modulename)).__file__ or ""), *joins))
2024-09-17 12:42:06                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-17 12:42:06   File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1483, in get_module
2024-09-17 12:42:06     return importlib.import_module(modulename)
2024-09-17 12:42:06            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-17 12:42:06   File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
2024-09-17 12:42:06     return _bootstrap._gcd_import(name[level:], package, level)
2024-09-17 12:42:06            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-17 12:42:06   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
2024-09-17 12:42:06   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
2024-09-17 12:42:06   File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
Nihantra-Patel commented 1 month ago

apply command and check it.

bench build --force

CC: @sagarvora

RajPW commented 1 month ago

@Nihantra-Patel i tried..error not clear.. give one video for india compliance installation step by step

Nihantra-Patel commented 1 month ago

Please check this.

RajPW commented 1 month ago

@Nihantra-Patel
I already this website refered to india_complaince install successfully ..

bench get-app https://github.com/resilient-tech/india-compliance.git bench --site [site name] install-app india_compliance

frappe@f12aae146fd6:~/frappe-bench$ bench get-app https://github.com/resilient-tech/india-compliance.git --branch version-15 Getting india-compliance $ git clone https://github.com/resilient-tech/india-compliance.git --branch version-15 --origin upstream Cloning into 'india-compliance'... remote: Enumerating objects: 33311, done. remote: Counting objects: 100% (3160/3160), done. remote: Compressing objects: 100% (1159/1159), done. remote: Total 33311 (delta 2386), reused 2482 (delta 1970), pack-reused 30151 (from 1) Receiving objects: 100% (33311/33311), 7.69 MiB | 6.47 MiB/s, done. Resolving deltas: 100% (23584/23584), done. Ignoring dependencies of https://github.com/resilient-tech/india-compliance.git. To install dependencies use --resolve-deps Installing india_compliance $ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/india_compliance $ bench build --app india_compliance ✔ Application Assets Linked

yarn run v1.22.22 $ node esbuild --production --apps india_compliance --run-build-command Browserslist: caniuse-lite is outdated. Please run: npx update-browserslist-db@latest Why you should do it regularly: https://github.com/browserslist/update-db#readme File Size

india_compliance/dist/js/ ├─ gstr1.bundle.K2EDK2GL.js 6.97 Kb ├─ india_compliance.bundle.RDJWGSGZ.js 33.14 Kb ├─ purchase_reconciliation_tool.bundle.KYAT73KU.js 5.66 Kb ├─ india_compliance_account.bundle.KB2LZBYY.js 140.59 Kb └─ india_compliance_account.bundle.Y33L76RA.css 7.44 Kb

india_compliance/dist/css/ ├─ india_compliance.bundle.F3CU5POB.css 0.10 Kb └─ india_compliance_account.bundle.NLKWFOIN.css 3.08 Kb

india_compliance/dist/css-rtl/ ├─ india_compliance.bundle.Y7WJDPVS.css 0.10 Kb └─ india_compliance_account.bundle.3FAO2MPH.css 3.08 Kb

DONE Total Build Time: 988.065ms

Done in 2.76s. Compiling translations for india_compliance WARN: restart failed: Couldn't find supervisorctl in PATH frappe@f12aae146fd6:~/frappe-bench$ bench --site frontend migrate Migrating frontend Updating DocTypes for frappe : [========================================] 100% Updating DocTypes for erpnext : [========================================] 100% Updating Dashboard for frappe Updating Dashboard for erpnext Updating customizations for Address Updating customizations for Contact Queued rebuilding of search index for frontend

frappe@f12aae146fd6:~/frappe-bench$ bench --site frontend install-app india_compliance App erpnext already installed

Installing india_compliance... Updating DocTypes for india_compliance: [========================================] 100% Setting up Income Tax... Setting up GST... Patching Existing Data... Thank you for installing India Compliance! Updating Dashboard for india_compliance

After install India_comp;liance css and js broken

Nihantra-Patel commented 1 month ago

We installed it locally and also on the frappe cloud side, but we haven't found the issue. If have an issue then raise it on the india-compliance github.

After install India_comp;liance css and js broken

after install the india-compliance you have to run the

bench build --app india_compliance

// OR

bench build --app india_compliance --force
Infochain2024 commented 1 month ago

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': ['idemo.info-chain.in'], 'force': False, 'verbose': False, 'profile': False} apps = ('india_compliance',) force = False _install_app = <function install_app at 0x743f7bd3d580> filelock = <function filelock at 0x743f7becb1a0> exit_code = 0 site = 'idemo.info-chain.in' 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 0x743f7b21dda0> sync_for = <function sync_for at 0x743f7b21eb60> sync_customizations = <function sync_customizations at 0x743f7cad18a0> sync_fixtures = <function sync_fixtures at 0x743f7b21ee80> 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_css': ['india_compliance.bundle.css'], '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',... 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 75, in after_install raise e File "apps/india_compliance/india_compliance/install.py", line 54, 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 = File "apps/frappe/frappe/model/document.py", line 283, in insert self._validate_links() 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 930, in _validatelinks frappe.throw(("Could not find {0}").format(msg), frappe.LinkValidationError) self = 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 652, 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 617, 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.._raise_exception at 0x743f796c93a0> inspect = <module 'inspect' from '/usr/lib/python3.12/inspect.py'> out = {'message': 'Could not find DocType: Bill of Entry', 'title': 'Message', 'indicator': 'red', 'raise_exception': 1, 'frappe_exc_id': 'bc0ec57a24342d50b578bff48092e9fd0a943f0f2531f52389f14362'} File "apps/frappe/frappe/init__.py", line 568, in _raise_exception raise exc exc = LinkValidationError('Could not find DocType: Bill of Entry') inspect = <module 'inspect' from '/usr/lib/python3.12/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': 'bc0ec57a24342d50b578bff48092e9fd0a943f0f2531f52389f14362'} raise_exception = <class 'frappe.exceptions.LinkValidationError'> frappe.exceptions.LinkValidationError: Could not find DocType: Bill of Entry

Infochain2024 commented 1 month ago

Any idea how to resolve this issue?

RajPW commented 1 month ago

@Infochain2024 i am not facing this issue.. no idea..... You which type installation method used? I am using docker installation method and locally hosted in my windows server...

Infochain2024 commented 1 month ago

I am using manual installation.

RajPW commented 1 month ago

@Infochain2024 sorry i am new user for erpnext. no idea this type of errors.... i am also stuck some errors, only manual installation lot of errors showing, Frappe cloud only is smooth running. but its paid platform....

vorasmit commented 1 month ago

Did you try installation with the docker guide given here?

You need to first build a custom image of India Compliance App with apps you need, and then use it in docker.

vinodjp21 commented 1 month ago

Did you try installation with the docker guide given here?

You need to first build a custom image of India Compliance App with apps you need, and then use it in docker.

The India compliance app has some issues with installation. Even I am getting the same error.

RajPW commented 1 month ago

@vinodjp21 yes... only manual installation lot of issues. This is india_compliance error or erpnext error so i am confused.....

you solve this errors.. i need help