Which version of Lending app is compatible with Frappe version-15?
i am getting error while installing the version-15 of lending app regarding the Duplicate entry of tabLoan Product primary key.
Installing lendingâŚ
Updating DocTypes for lending : [========================================] 100%
Running post-install patches to patch existing dataâŚ
An error occurred while installing lending: (1062, âDuplicate entry âLoan Productâ for key âPRIMARYââ)
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â: [âtechintegraerp.comâ], âforceâ: False, âverboseâ: False, âprofileâ: False}
apps = (âlendingâ,)
force = False
_install_app = <function install_app at 0x7f1450e6dc60>
filelock = <function filelock at 0x7f1450e5fbe0>
exit_code = 0
site = âtechintegraerp.comâ
app = âlendingâ
err = IntegrityError(1062, âDuplicate entry âLoan Productâ for key âPRIMARYââ)
File âapps/frappe/frappe/installer.pyâ, line 326, in install_app
frappe.get_attr(after_install)()
name = âlendingâ
verbose = False
set_as_patched = True
force = False
sync_jobs = <function sync_jobs at 0x7f14503f7d00>
sync_for = <function sync_for at 0x7f1450410820>
sync_customizations = <function sync_customizations at 0x7f1451f816c0>
sync_fixtures = <function sync_fixtures at 0x7f1450410a60>
app_hooks = {âafter_installâ: [âlending.install.after_installâ], âapp_descriptionâ: [âOpen Source Lending softwareâ], âapp_emailâ: [âcontact@frappe.ioâ], âapp_include_jsâ: [âlending.bundle.jsâ], âapp_licenseâ: [âGNU General Public License (v3)â], âapp_nameâ: [âlendingâ], âapp_publisherâ: [âFrappe Technologies Pvt. Ltd.â], âapp_titleâ: [âFrappe Lendingâ], âaudit_trail_doctypesâ: [âLoan Balance Adjustmentâ, âLoan Disbursementâ, âLoan Interest Accrualâ, âLoan Refundâ, âLoan Repaymentâ, âLoan Write Offâ], âbank_reconciliation_doctypesâ: [âLoan Repaymentâ, âLoan Disbursementâ], âbefore_testsâ: [âlending.utils.before_testsâ], âdoc_eventsâ: {âCompanyâ: {âvalidateâ: [âlending.overrides.company.validate_loan_tablesâ]}}, âget_amounts_not_reflected_in_system_for_bank_reconciliation_statementâ: [âlending.loan_management.utils.get_amounts_not_reflected_in_system_for_bank_reconciliation_statementâ], âget_entries_for_bank_clearance_summaryâ: [âlending.loan_management.utils.get_entries_for_bank_clearance_summaryââŚ
installed_apps = [âfrappeâ, âerpnextâ, âhrmsâ, ânationalpfâ, âpaymentsâ]
app = âerpnextâ
required_app = âerpnextâ
after_install = âlending.install.after_installâ
File âapps/lending/lending/install.pyâ, line 236, in after_install
run_patches(get_post_install_patches())
File âapps/lending/lending/install.pyâ, line 227, in run_patches
frappe.get_attr(f"lending.patches.v15_0.{patch}.execute")()
patches = (ârename_loan_type_to_loan_productâ, âgenerate_loan_repayment_scheduleâ, âupdate_loan_typesâ, âmake_loan_type_non_submittableâ, âmigrate_loan_type_to_loan_productâ, âadd_loan_product_code_and_rename_loan_nameâ, âupdate_penalty_interest_method_in_loan_productsâ)
patch = ârename_loan_type_to_loan_productâ
File âapps/lending/lending/patches/v15_0/rename_loan_type_to_loan_product.pyâ, line 13, in execute
rename_doc(
File âapps/frappe/frappe/model/rename_doc.pyâ, line 177, in rename_doc
rename_parent_and_child(doctype, old, new, meta)
doctype = âDocTypeâ
old = âLoan Typeâ
new = âLoan Productâ
force = True
merge = False
ignore_permissions = False
ignore_if_exists = False
show_alert = True
rebuild_search = True
doc = None
validate = False
old_usage_style = âLoan Productâ
new_usage_style = None
meta = <Meta: DocType>
File âapps/frappe/frappe/model/rename_doc.pyâ, line 328, in rename_parent_and_child
frappe.qb.update(doctype).set(ânameâ, new).where(Field(ânameâ) == old).run()
doctype = âDocTypeâ
old = âLoan Typeâ
new = âLoan Productâ
meta = <Meta: DocType>
File âapps/frappe/frappe/query_builder/utils.pyâ, line 87, in execute_query
result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
query = âUPDATE tabDocType
SET name
=%(param1)s WHERE name
=%(param2)sâ
args = ()
kwargs = {}
child_queries =
params = {âparam1â: âLoan Productâ, âparam2â: âLoan Typeâ}
execute_child_queries = <function patch_query_execute..execute_child_queries at 0x7f14503a6d40>
prepare_query = <function patch_query_execute..prepare_query at 0x7f14503a6dd0>
File âapps/frappe/frappe/database/database.pyâ, line 230, in sql
self._cursor.execute(query, values)
self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7f1450395f30>
query = âUPDATE tabDocType
SET name
=%(param1)s WHERE name
=%(param2)sâ
values = {âparam1â: âLoan Productâ, âparam2â: âLoan Typeâ}
as_dict = 0
as_list = 0
debug = False
ignore_ddl = 0
auto_commit = 0
update = None
explain = False
run = True
pluck = False
as_iterator = False
trace_id = None
File âenv/lib/python3.10/site-packages/pymysql/cursors.pyâ, line 153, in execute
result = self._query(query)
self = <pymysql.cursors.Cursor object at 0x7f144fea7e50>
query = âUPDATE tabDocType
SET name
=âLoan Productâ WHERE name
=âLoan Typeââ
args = {âparam1â: âLoan Productâ, âparam2â: âLoan Typeâ}
File âenv/lib/python3.10/site-packages/pymysql/cursors.pyâ, line 322, in _query
conn.query(q)
self = <pymysql.cursors.Cursor object at 0x7f144fea7e50>
q = âUPDATE tabDocType
SET name
=âLoan Productâ WHERE name
=âLoan Typeââ
conn = <pymysql.connections.Connection object at 0x7f144fea7d90>
File âenv/lib/python3.10/site-packages/pymysql/connections.pyâ, line 563, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
self = <pymysql.connections.Connection object at 0x7f144fea7d90>
sql = b"UPDATE tabDocType
SET name
=âLoan Productâ WHERE name
=âLoan Typeâ"
unbuffered = False
File âenv/lib/python3.10/site-packages/pymysql/connections.pyâ, line 825, in _read_query_result
result.read()
self = <pymysql.connections.Connection object at 0x7f144fea7d90>
unbuffered = False
result = <pymysql.connections.MySQLResult object at 0x7f144f02bf10>
File âenv/lib/python3.10/site-packages/pymysql/connections.pyâ, line 1199, in read
first_packet = self.connection._read_packet()
self = <pymysql.connections.MySQLResult object at 0x7f144f02bf10>
File âenv/lib/python3.10/site-packages/pymysql/connections.pyâ, line 775, in _read_packet
packet.raise_for_error()
self = <pymysql.connections.Connection object at 0x7f144fea7d90>
packet_type = <class âpymysql.protocol.MysqlPacketâ>
buff = bytearray(b"\xff&\x04#23000Duplicate entry 'Loan Product' for key 'PRIMARY'â)
packet_header = bâ9\x00\x00\x01â
btrl = 57
btrh = 0
packet_number = 1
bytes_to_read = 57
recv_data = bâ\xff&\x04#23000Duplicate entry âLoan Productâ for key âPRIMARYâ"
packet = <pymysql.protocol.MysqlPacket object at 0x7f144f1b78b0>
File âenv/lib/python3.10/site-packages/pymysql/protocol.pyâ, line 219, in raise_for_error
err.raise_mysql_exception(self._data)
self = <pymysql.protocol.MysqlPacket object at 0x7f144f1b78b0>
errno = 1062
File âenv/lib/python3.10/site-packages/pymysql/err.pyâ, line 150, in raise_mysql_exception
raise errorclass(errno, errval)
data = b"\xff&\x04#23000Duplicate entry âLoan Productâ for key âPRIMARYâ"
errno = 1062
errval = âDuplicate entry âLoan Productâ for key âPRIMARYââ
errorclass = <class âpymysql.err.IntegrityErrorâ>
pymysql.err.IntegrityError: (1062, âDuplicate entry âLoan Productâ for key âPRIMARYââ)
this is the error i am getting