Installation failed with ImportError: Module import failed for Payment Reconciliation (erpnext.accounts.doctype.payment_reconciliation.payment_reconciliation)

I am installing erpnext for the first time. I have created a new site and trying to install erpnext into this new site. it failed with the ImportError message. Complete log is as follows:

frappe@erpnext:~/trufil_bench$ bench install-app erpnext
Installing erpnext...
Updating DocTypes for erpnext       : [                                        ]Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/", line 72, in _run_code
    exec code in run_globals
  File "/home/frappe/trufil_bench/apps/frappe/frappe/utils/", line 79, in <module>
  File "/home/frappe/trufil_bench/apps/frappe/frappe/utils/", line 16, in main
  File "/home/frappe/trufil_bench/env/local/lib/python2.7/site-packages/click/", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/trufil_bench/env/local/lib/python2.7/site-packages/click/", line 697, in main
    rv = self.invoke(ctx)
  File "/home/frappe/trufil_bench/env/local/lib/python2.7/site-packages/click/", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/trufil_bench/env/local/lib/python2.7/site-packages/click/", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/trufil_bench/env/local/lib/python2.7/site-packages/click/", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/trufil_bench/env/local/lib/python2.7/site-packages/click/", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/trufil_bench/env/local/lib/python2.7/site-packages/click/", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/trufil_bench/apps/frappe/frappe/commands/", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/trufil_bench/apps/frappe/frappe/commands/", line 152, in install_app
    _install_app(app, verbose=context.verbose)
  File "/home/frappe/trufil_bench/apps/frappe/frappe/", line 132, in install_app
    sync_for(name, force=True, sync_everything=True, verbose=verbose, reset_permissions=True)
  File "/home/frappe/trufil_bench/apps/frappe/frappe/model/", line 45, in sync_for
  File "/home/frappe/trufil_bench/apps/frappe/frappe/modules/", line 58, in import_file_by_path
    ignore_version=ignore_version, reset_permissions=reset_permissions)
  File "/home/frappe/trufil_bench/apps/frappe/frappe/modules/", line 129, in import_doc
  File "/home/frappe/trufil_bench/apps/frappe/frappe/model/", line 212, in insert
  File "/home/frappe/trufil_bench/apps/frappe/frappe/model/", line 776, in run_post_save_methods
  File "/home/frappe/trufil_bench/apps/frappe/frappe/model/", line 655, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/trufil_bench/apps/frappe/frappe/model/", line 871, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/trufil_bench/apps/frappe/frappe/model/", line 854, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/trufil_bench/apps/frappe/frappe/model/", line 649, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/trufil_bench/apps/frappe/frappe/core/doctype/doctype/", line 197, in on_update
  File "/home/frappe/trufil_bench/apps/frappe/frappe/core/doctype/doctype/", line 206, in run_module_method
    module = load_doctype_module(, self.module)
  File "/home/frappe/trufil_bench/apps/frappe/frappe/modules/", line 179, in load_doctype_module
    raise ImportError, 'Module import failed for {0} ({1})'.format(doctype, module_name)
ImportError: Module import failed for Payment Reconciliation (erpnext.accounts.doctype.payment_reconciliation.payment_reconciliation)

What can be the possible cause? Please help

Do you have local changes in payment_reconciliation ?

Also which branch are you on?

No local changes as it was my first manual install. I am on develop branch.

I am working on Manual Setup and steps taken are as follows:

  1. bench get-app erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)

  2. bench new-site tferp

  3. bench use tferp

  4. bench install-app erpnext

I deleted the directory apps/erpnext for another round and again the error was the same.

I hope I am able to clarify the situation. Please support.

i am getting same error

Hi @Hardik_Mehta,
Do you get any solution for this error?

This error comes up because of version mismatch.
Make sure your node version is 14.x.x

and the following should work for ERPNext v13
bench init --frappe-branch version-13 --python python3.9 frappe-bench
cd frappe-bench
bench start

In a separate terminal

navigate to frappe-bench folder
bench get-app --branch version-13 erpnext
bench new-site play.test
bench --site play.test install-app erpnext