frappe / erpnext

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

An error occurred while installing erpnext: ('DocType', 'Account') #23096

Closed M0hammedHaris closed 4 years ago

M0hammedHaris commented 4 years ago

Description of the issue

Tried Installing ErpNext on new site with the latest pull.

Context information (for bug reports)

This is what it shows Output of bench version

$ bench --site test.site install-app erpnext

Installing erpnext...
Updating DocTypes for erpnext       : [===                                     ] 9%An error occurred while installing erpnext:
('DocType', 'Account')

Traceback that I found`

$ bench --site test.site install-app erpnext

Installing erpnext...
Updating DocTypes for erpnext       : [===                                     ] 9%An error occurred while installing erpnext:
Traceback (most recent call last):
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/commands/site.py", line 215, in install_app
    _install_app(app, verbose=context.verbose)
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/installer.py", line 84, in install_app
    sync_for(name, force=True, sync_everything=True, verbose=verbose, reset_permissions=True)
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/model/sync.py", line 69, in sync_for
    import_file_by_path(doc_path, force=force, ignore_version=True,
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 69, in import_file_by_path
    import_doc(doc, force=force, data_import=data_import, pre_process=pre_process,
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 143, in import_doc
    doc.insert()
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/model/document.py", line 268, in insert
    self.run_post_save_methods()
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/model/document.py", line 964, in run_post_save_methods
    self.run_method("on_update")
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/model/document.py", line 831, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/model/document.py", line 1116, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/model/document.py", line 1099, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/model/document.py", line 825, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 291, in on_update
    self.run_module_method("on_doctype_update")
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py", line 357, in run_module_method
    module = load_doctype_module(self.name, self.module)
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/modules/utils.py", line 204, in load_doctype_module
    doctype_python_modules[key] = frappe.get_module(module_name)
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/__init__.py", line 858, in get_module
    return importlib.import_module(modulename)
  File "/home/haris/myproject/frappe-bench/env/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/haris/myproject/frappe-bench/apps/erpnext/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py", line 8, in <module>
    from erpnext.accounts.report.general_ledger.general_ledger import execute as get_soa
  File "/home/haris/myproject/frappe-bench/apps/erpnext/erpnext/accounts/report/general_ledger/general_ledger.py", line 7, in <module>
    from erpnext.accounts.report.utils import get_currency, convert_to_presentation_currency
  File "/home/haris/myproject/frappe-bench/apps/erpnext/erpnext/accounts/report/utils.py", line 10, in <module>
    sum(frappe.get_list('Account', fields=['name'], or_filters=[{'root_type': 'Income'}, {'root_type': 'Expense'}], as_list=True), ())
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/__init__.py", line 1329, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/model/db_query.py", line 96, in execute
    result = self.build_and_run()
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/model/db_query.py", line 110, in build_and_run
    args = self.prepare_args()
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/model/db_query.py", line 136, in prepare_args
    self.set_optional_columns()
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/model/db_query.py", line 302, in set_optional_columns
    columns = get_table_columns(self.doctype)
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/model/meta.py", line 49, in get_table_columns
    return frappe.db.get_table_columns(doctype)
  File "/home/haris/myproject/frappe-bench/apps/frappe/frappe/database/database.py", line 893, in get_table_columns
    raise self.TableMissingError('DocType', doctype)
pymysql.err.ProgrammingError: ('DocType', 'Account')

Steps to reproduce the issue

  1. Get the latest commit (git pull)
  2. Create a new site.
  3. Install ErpNext.
Alsaheem commented 4 years ago

same issue..... my own breaks at 7%

bobzz-zone commented 4 years ago

same issue here

Alsaheem commented 4 years ago

hello @nabinhait what do you suggest that i do

nabinhait commented 4 years ago

Pushed a fix, you should be able to install erpnext now

Alsaheem commented 4 years ago

Screenshot 2020-08-22 at 11 53 51

this is what i face when i install without issues @nabinhait

Alsaheem commented 4 years ago

Here are the logs ----thanks----

127.0.0.1 - - [22/Aug/2020 12:14:58] "POST /api/method/frappe.desk.page.setup_wizard.setup_wizard.setup_complete HTTP/1.1" 200 - 12:15:39 web.1 | 127.0.0.1 - - [22/Aug/2020 12:15:39] "POST /api/method/erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts.validate_bank_account HTTP/1.1" 200 - 12:16:32 web.1 | Detected change in '/Users/qiesto/Desktop/develop/frappe-bench/apps/erpnext/erpnext/domains/pycache/init.cpython-38.pyc', reloading 12:16:32 web.1 | Detected change in '/Users/qiesto/Desktop/develop/frappe-bench/apps/erpnext/erpnext/domains/pycache/distribution.cpython-38.pyc', reloading 12:16:32 web.1 | Detected change in '/Users/qiesto/Desktop/develop/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_settings/pycache/stock_settings.cpython-38.pyc', reloading 12:16:32 web.1 | Detected change in '/Users/qiesto/Desktop/develop/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_settings/pycache/init.cpython-38.pyc', reloading 12:16:33 web.1 | Restarting with fsevents reloader 12:16:37 web.1 | Debugger is active! 12:16:37 web.1 | Debugger PIN: 830-048-129 12:18:29 web.1 | 127.0.0.1 - - [22/Aug/2020 12:18:29] "POST /api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status HTTP/1.1" 200 - 12:18:56 web.1 | 127.0.0.1 - - [22/Aug/2020 12:18:56] "POST /api/method/erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts.validate_bank_account HTTP/1.1" 200 - 12:19:42 web.1 | Detected change in '/Users/qiesto/Desktop/develop/frappe-bench/apps/erpnext/erpnext/domains/pycache/healthcare.cpython-38.pyc', reloading 12:19:42 web.1 | Detected change in '/Users/qiesto/Desktop/develop/frappe-bench/apps/erpnext/erpnext/domains/pycache/agriculture.cpython-38.pyc', reloading 12:19:44 web.1 | Restarting with fsevents reloader 12:19:47 web.1 | Debugger is active! 12:19:47 web.1 | Debugger PIN: 830-048-129

Alsaheem commented 4 years ago

its worked now

i just had to retry a lot of times