Dear all,
if I try to upgrade erponext v13 to v14, the bench update --patch fails with following error message:
================
File “/srv/frappe-bench/frappe-bench/apps/erpnext/erpnext/patches/v14_0/migrate_gl_to_payment_ledger.py”, line 189, in execute
raise err
gl = Table(‘tabGL Entry’)
account = Table(‘tabAccount’)
ifelse = <pypika.terms.CustomFunction object at 0x7f336313d2d0>
relavant_accounts = [{‘name’: ‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘208000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘209000 - Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘210000 - Forderungen aus Lief. und Leist. EU - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘213000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. EU - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘214000 - Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. EU - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘215000 - Forderungen aus Lief. und Leist. Ausland - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘218000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Ausland - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: '220000 - Forderungen gegenüber verbundenen Unternehmen …
receivable_accounts = [‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘208000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘209000 - Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘210000 - Forderungen aus Lief. und Leist. EU - S-DTM’, ‘213000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. EU - S-DTM’, ‘214000 - Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. EU - S-DTM’, ‘215000 - Forderungen aus Lief. und Leist. Ausland - S-DTM’, ‘218000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Ausland - S-DTM’, ‘220000 - Forderungen gegenüber verbundenen Unternehmen - S-DTM’, ‘223000 - Einzelwertberichtigungen zu Forderungen gegenüber verbundenen Unternehmen - S-DTM’, ‘224000 - Pauschalwertberichtigungen zu Forderungen gegenüber verbundenen Unternehmen - S-DTM’, ‘225000 - Forderungen gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht - S-DTM’, '228000 - Einzelwertberichtig…
accounts = [‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘208000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘209000 - Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘210000 - Forderungen aus Lief. und Leist. EU - S-DTM’, ‘213000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. EU - S-DTM’, ‘214000 - Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. EU - S-DTM’, ‘215000 - Forderungen aus Lief. und Leist. Ausland - S-DTM’, ‘218000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Ausland - S-DTM’, ‘220000 - Forderungen gegenüber verbundenen Unternehmen - S-DTM’, ‘223000 - Einzelwertberichtigungen zu Forderungen gegenüber verbundenen Unternehmen - S-DTM’, ‘224000 - Pauschalwertberichtigungen zu Forderungen gegenüber verbundenen Unternehmen - S-DTM’, ‘225000 - Forderungen gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht - S-DTM’, '228000 - Einzelwertberichtig…
un_processed = 504
processed = 0
last_update_percent = 0
batch_size = 5000
last_name = ‘ACC-GLE-2024-01067’
where_clause = <pypika.terms.BasicCriterion object at 0x7f336301c760>
gl_entries = [{‘name’: 0, ‘creation’: datetime.datetime(2023, 11, 19, 22, 8, 32, 830312), ‘modified’: datetime.datetime(2023, 11, 19, 22, 8, 32, 830312), ‘modified_by’: ‘thomas.mohr@mohrkeg.co.at’, ‘owner’: ‘thomas.mohr@mohrkeg.co.at’, ‘docstatus’: ‘1’, ‘parent’: None, ‘parentfield’: None, ‘parenttype’: None, ‘idx’: 0, ‘posting_date’: datetime.date(2022, 1, 1), ‘transaction_date’: None, ‘account’: ‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘party_type’: ‘Customer’, ‘party’: ‘Medizinische Universität Wien’, ‘cost_center’: ‘Main - S-DTM’, ‘debit’: 10564.8, ‘credit’: 0.0, ‘account_currency’: ‘EUR’, ‘debit_in_account_currency’: 10564.8, ‘credit_in_account_currency’: 0.0, ‘against’: ‘989000 - Gewinn- und Verlustrechnung - S-DTM, 970001 - Einlagen Ingrid Mohr - S-DTM, 280003 - VB 31839360002 - S-DTM, 280002 - VB 31839360001 - S-DTM, 980000 - Eröffnungsbilanz - S-DTM, Finanzamt Baden Mödling’, ‘against_voucher_type’: ‘Journal Entry’, ‘against_voucher’: None, ‘voucher_type’: 'Journal Entry…
insert_query =
File “/srv/frappe-bench/frappe-bench/apps/erpnext/erpnext/patches/v14_0/migrate_gl_to_payment_ledger.py”, line 176, in execute
insert_chunk_into_payment_ledger(insert_query, gl_entries)
gl = Table(‘tabGL Entry’)
account = Table(‘tabAccount’)
ifelse = <pypika.terms.CustomFunction object at 0x7f336313d2d0>
relavant_accounts = [{‘name’: ‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘208000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘209000 - Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘210000 - Forderungen aus Lief. und Leist. EU - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘213000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. EU - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘214000 - Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. EU - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘215000 - Forderungen aus Lief. und Leist. Ausland - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: ‘218000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Ausland - S-DTM’, ‘account_type’: ‘Receivable’}, {‘name’: '220000 - Forderungen gegenüber verbundenen Unternehmen …
receivable_accounts = [‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘208000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘209000 - Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘210000 - Forderungen aus Lief. und Leist. EU - S-DTM’, ‘213000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. EU - S-DTM’, ‘214000 - Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. EU - S-DTM’, ‘215000 - Forderungen aus Lief. und Leist. Ausland - S-DTM’, ‘218000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Ausland - S-DTM’, ‘220000 - Forderungen gegenüber verbundenen Unternehmen - S-DTM’, ‘223000 - Einzelwertberichtigungen zu Forderungen gegenüber verbundenen Unternehmen - S-DTM’, ‘224000 - Pauschalwertberichtigungen zu Forderungen gegenüber verbundenen Unternehmen - S-DTM’, ‘225000 - Forderungen gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht - S-DTM’, '228000 - Einzelwertberichtig…
accounts = [‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘208000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘209000 - Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘210000 - Forderungen aus Lief. und Leist. EU - S-DTM’, ‘213000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. EU - S-DTM’, ‘214000 - Pauschalwertberichtigungen zu Forderungen aus Lief. und Leist. EU - S-DTM’, ‘215000 - Forderungen aus Lief. und Leist. Ausland - S-DTM’, ‘218000 - Einzelwertberichtigungen zu Forderungen aus Lief. und Leist. Ausland - S-DTM’, ‘220000 - Forderungen gegenüber verbundenen Unternehmen - S-DTM’, ‘223000 - Einzelwertberichtigungen zu Forderungen gegenüber verbundenen Unternehmen - S-DTM’, ‘224000 - Pauschalwertberichtigungen zu Forderungen gegenüber verbundenen Unternehmen - S-DTM’, ‘225000 - Forderungen gegenüber Unternehmen, mit denen ein Beteiligungsverhältnis besteht - S-DTM’, ‘228000 - Einzelwertberichtig…
un_processed = 504
processed = 0
last_update_percent = 0
batch_size = 5000
last_name = ‘ACC-GLE-2024-01067’
where_clause = <pypika.terms.BasicCriterion object at 0x7f336301c760>
gl_entries = [{‘name’: 0, ‘creation’: datetime.datetime(2023, 11, 19, 22, 8, 32, 830312), ‘modified’: datetime.datetime(2023, 11, 19, 22, 8, 32, 830312), ‘modified_by’: ‘thomas.mohr@mohrkeg.co.at’, ‘owner’: ‘thomas.mohr@mohrkeg.co.at’, ‘docstatus’: ‘1’, ‘parent’: None, ‘parentfield’: None, ‘parenttype’: None, ‘idx’: 0, ‘posting_date’: datetime.date(2022, 1, 1), ‘transaction_date’: None, ‘account’: ‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘party_type’: ‘Customer’, ‘party’: ‘Medizinische Universität Wien’, ‘cost_center’: ‘Main - S-DTM’, ‘debit’: 10564.8, ‘credit’: 0.0, ‘account_currency’: ‘EUR’, ‘debit_in_account_currency’: 10564.8, ‘credit_in_account_currency’: 0.0, ‘against’: ‘989000 - Gewinn- und Verlustrechnung - S-DTM, 970001 - Einlagen Ingrid Mohr - S-DTM, 280003 - VB 31839360002 - S-DTM, 280002 - VB 31839360001 - S-DTM, 980000 - Eröffnungsbilanz - S-DTM, Finanzamt Baden Mödling’, ‘against_voucher_type’: ‘Journal Entry’, ‘against_voucher’: None, ‘voucher_type’: ‘Journal Entry…
insert_query =
File “/srv/frappe-bench/frappe-bench/apps/erpnext/erpnext/patches/v14_0/migrate_gl_to_payment_ledger.py”, line 96, in insert_chunk_into_payment_ledger
insert_query.run()
insert_query = INSERT INTO tabPayment Ledger Entry
(name
,creation
,modified
,modified_by
,owner
,docstatus
,posting_date
,account_type
,account
,party_type
,party
,voucher_type
,voucher_no
,against_voucher_type
,against_voucher_no
,amount
,amount_in_account_currency
,account_currency
,company
,cost_center
,due_date
,finance_book
,remarks
) VALUES (0,‘2023-11-19T22:08:32.830312’,‘2023-11-19T22:08:32.830312’,‘thomas.mohr@mohrkeg.co.at’,‘thomas.mohr@mohrkeg.co.at’,‘1’,‘2022-01-01’,‘Receivable’,‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’,‘Customer’,‘Medizinische Universität Wien’,‘Journal Entry’,‘ACC-JV-2022-00001’,‘Journal Entry’,‘ACC-JV-2022-00001’,10564.8,10564.8,‘EUR’,‘ScienceConsult - DI Thomas Mohr KG’,‘Main - S-DTM’,NULL,NULL,’’),(1,‘2023-11-19T22:08:32.891472’,‘2023-11-19T22:08:32.891472’,‘thomas.mohr@mohrkeg.co.at’,‘thomas.mohr@mohrkeg.co.at’,‘1’,‘2022-01-01’,‘Payable’,‘359000 - Verrechnung Finanzamt - S-DTM’,‘Supplier’,‘Finanzamt Baden Mödling’,'Journal …
gl_entries = [{‘name’: 0, ‘creation’: datetime.datetime(2023, 11, 19, 22, 8, 32, 830312), ‘modified’: datetime.datetime(2023, 11, 19, 22, 8, 32, 830312), ‘modified_by’: ‘thomas.mohr@mohrkeg.co.at’, ‘owner’: ‘thomas.mohr@mohrkeg.co.at’, ‘docstatus’: ‘1’, ‘parent’: None, ‘parentfield’: None, ‘parenttype’: None, ‘idx’: 0, ‘posting_date’: datetime.date(2022, 1, 1), ‘transaction_date’: None, ‘account’: ‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘party_type’: ‘Customer’, ‘party’: ‘Medizinische Universität Wien’, ‘cost_center’: ‘Main - S-DTM’, ‘debit’: 10564.8, ‘credit’: 0.0, ‘account_currency’: ‘EUR’, ‘debit_in_account_currency’: 10564.8, ‘credit_in_account_currency’: 0.0, ‘against’: ‘989000 - Gewinn- und Verlustrechnung - S-DTM, 970001 - Einlagen Ingrid Mohr - S-DTM, 280003 - VB 31839360002 - S-DTM, 280002 - VB 31839360001 - S-DTM, 980000 - Eröffnungsbilanz - S-DTM, Finanzamt Baden Mödling’, ‘against_voucher_type’: ‘Journal Entry’, ‘against_voucher’: None, ‘voucher_type’: ‘Journal Entry…
columns = [‘name’, ‘creation’, ‘modified’, ‘modified_by’, ‘owner’, ‘docstatus’, ‘posting_date’, ‘account_type’, ‘account’, ‘party_type’, ‘party’, ‘voucher_type’, ‘voucher_no’, ‘against_voucher_type’, ‘against_voucher_no’, ‘amount’, ‘amount_in_account_currency’, ‘account_currency’, ‘company’, ‘cost_center’, ‘due_date’, ‘finance_book’, ‘remarks’]
entry = {‘name’: 503, ‘creation’: datetime.datetime(2024, 10, 14, 8, 47, 3, 759014), ‘modified’: datetime.datetime(2024, 10, 14, 8, 47, 3, 759014), ‘modified_by’: ‘thomas.mohr@mohrkeg.co.at’, ‘owner’: ‘thomas.mohr@mohrkeg.co.at’, ‘docstatus’: ‘1’, ‘parent’: None, ‘parentfield’: None, ‘parenttype’: None, ‘idx’: 0, ‘posting_date’: datetime.date(2023, 11, 3), ‘transaction_date’: None, ‘account’: ‘330000 - Verbindlichkeiten aus Lieferungen u. Leistungen Inland - S-DTM’, ‘party_type’: ‘Supplier’, ‘party’: ‘T-Mobile Austria GmbH’, ‘cost_center’: None, ‘debit’: 33.98, ‘credit’: 0.0, ‘account_currency’: ‘EUR’, ‘debit_in_account_currency’: 33.98, ‘credit_in_account_currency’: 0.0, ‘against’: ‘280002 - VB 31839360001 - S-DTM’, ‘against_voucher_type’: ‘Journal Entry’, ‘against_voucher’: ‘ACC-JV-2024-00061’, ‘voucher_type’: ‘Payment Entry’, ‘voucher_no’: ‘ACC-PAY-2024-00066’, ‘voucher_detail_no’: None, ‘project’: None, ‘remarks’: ‘Amount EUR 33.98 to T-Mobile Austria GmbH\nTransaction reference no 6270858…
data = (503, datetime.datetime(2024, 10, 14, 8, 47, 3, 759014), datetime.datetime(2024, 10, 14, 8, 47, 3, 759014), ‘thomas.mohr@mohrkeg.co.at’, ‘thomas.mohr@mohrkeg.co.at’, ‘1’, datetime.date(2023, 11, 3), ‘Payable’, ‘330000 - Verbindlichkeiten aus Lieferungen u. Leistungen Inland - S-DTM’, ‘Supplier’, ‘T-Mobile Austria GmbH’, ‘Payment Entry’, ‘ACC-PAY-2024-00066’, ‘Journal Entry’, ‘ACC-JV-2024-00061’, -33.98, -33.98, ‘EUR’, ‘ScienceConsult - DI Thomas Mohr KG’, None, None, None, ‘Amount EUR 33.98 to T-Mobile Austria GmbH\nTransaction reference no 6270858875 dated 2023-11-03’)
column = ‘remarks’
File “/srv/frappe-bench/frappe-bench/apps/frappe/frappe/query_builder/utils.py”, line 87, in execute_query
result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
query = "INSERT INTO tabPayment Ledger Entry
(name
,creation
,modified
,modified_by
,owner
,docstatus
,posting_date
,account_type
,account
,party_type
,party
,voucher_type
,voucher_no
,against_voucher_type
,against_voucher_no
,amount
,amount_in_account_currency
,account_currency
,company
,cost_center
,due_date
,finance_book
,remarks
) VALUES (0,‘2023-11-19T22:08:32.830312’,‘2023-11-19T22:08:32.830312’,%(param1)s,%(param2)s,%(param3)s,‘2022-01-01’,%(param4)s,%(param5)s,%(param6)s,%(param7)s,%(param8)s,%(param9)s,%(param10)s,%(param11)s,10564.8,10564.8,%(param12)s,%(param13)s,%(param14)s,NULL,NULL,%(param15)s),(1,‘2023-11-19T22:08:32.891472’,‘2023-11-19T22:08:32.891472’,%(param16)s,%(param17)s,%(param18)s,‘2022-01-01’,%(param19)s,%(param20)s,%(param21)s,%(param22)s,%(param23)s,%(param24)s,%(param25)s,%(param26)s,-4192.71,-4192.71,%(param27)s,%(param28)s,%(param29)s,NULL,NULL,%(param30)s),(2,‘2023-11-20T12:09:27.393397’,‘2023-11-20T12:09:27.393397’,%(param31)s,%(param32)s…
args = ()
kwargs = {}
child_queries =
params = {‘param1’: ‘thomas.mohr@mohrkeg.co.at’, ‘param2’: ‘thomas.mohr@mohrkeg.co.at’, ‘param3’: ‘1’, ‘param4’: ‘Receivable’, ‘param5’: ‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘param6’: ‘Customer’, ‘param7’: ‘Medizinische Universität Wien’, ‘param8’: ‘Journal Entry’, ‘param9’: ‘ACC-JV-2022-00001’, ‘param10’: ‘Journal Entry’, ‘param11’: ‘ACC-JV-2022-00001’, ‘param12’: ‘EUR’, ‘param13’: ‘ScienceConsult - DI Thomas Mohr KG’, ‘param14’: ‘Main - S-DTM’, ‘param15’: ‘’, ‘param16’: ‘thomas.mohr@mohrkeg.co.at’, ‘param17’: ‘thomas.mohr@mohrkeg.co.at’, ‘param18’: ‘1’, ‘param19’: ‘Payable’, ‘param20’: ‘359000 - Verrechnung Finanzamt - S-DTM’, ‘param21’: ‘Supplier’, ‘param22’: ‘Finanzamt Baden Mödling’, ‘param23’: ‘Journal Entry’, ‘param24’: ‘ACC-JV-2022-00001’, ‘param25’: ‘Journal Entry’, ‘param26’: ‘ACC-JV-2022-00001’, ‘param27’: ‘EUR’, ‘param28’: ‘ScienceConsult - DI Thomas Mohr KG’, ‘param29’: ‘Main - S-DTM’, ‘param30’: ‘’, ‘param31’: ‘thomas.mohr@mohrkeg.co.at’, ‘param32’: ‘thomas…
execute_child_queries = <function patch_query_execute..execute_child_queries at 0x7f33afd5f910>
prepare_query = <function patch_query_execute..prepare_query at 0x7f33afd815a0>
File “/srv/frappe-bench/frappe-bench/apps/frappe/frappe/database/database.py”, line 244, in sql
self._cursor.execute(query, values)
self = <frappe.database.mariadb.database.MariaDBDatabase object at 0x7f33afd70ee0>
query = "INSERT INTO tabPayment Ledger Entry
(name
,creation
,modified
,modified_by
,owner
,docstatus
,posting_date
,account_type
,account
,party_type
,party
,voucher_type
,voucher_no
,against_voucher_type
,against_voucher_no
,amount
,amount_in_account_currency
,account_currency
,company
,cost_center
,due_date
,finance_book
,remarks
) VALUES (0,‘2023-11-19T22:08:32.830312’,‘2023-11-19T22:08:32.830312’,%(param1)s,%(param2)s,%(param3)s,‘2022-01-01’,%(param4)s,%(param5)s,%(param6)s,%(param7)s,%(param8)s,%(param9)s,%(param10)s,%(param11)s,10564.8,10564.8,%(param12)s,%(param13)s,%(param14)s,NULL,NULL,%(param15)s),(1,‘2023-11-19T22:08:32.891472’,‘2023-11-19T22:08:32.891472’,%(param16)s,%(param17)s,%(param18)s,‘2022-01-01’,%(param19)s,%(param20)s,%(param21)s,%(param22)s,%(param23)s,%(param24)s,%(param25)s,%(param26)s,-4192.71,-4192.71,%(param27)s,%(param28)s,%(param29)s,NULL,NULL,%(param30)s),(2,‘2023-11-20T12:09:27.393397’,‘2023-11-20T12:09:27.393397’,%(param31)s,%(param32)s…
values = {‘param1’: ‘thomas.mohr@mohrkeg.co.at’, ‘param2’: ‘thomas.mohr@mohrkeg.co.at’, ‘param3’: ‘1’, ‘param4’: ‘Receivable’, ‘param5’: ‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘param6’: ‘Customer’, ‘param7’: ‘Medizinische Universität Wien’, ‘param8’: ‘Journal Entry’, ‘param9’: ‘ACC-JV-2022-00001’, ‘param10’: ‘Journal Entry’, ‘param11’: ‘ACC-JV-2022-00001’, ‘param12’: ‘EUR’, ‘param13’: ‘ScienceConsult - DI Thomas Mohr KG’, ‘param14’: ‘Main - S-DTM’, ‘param15’: ‘’, ‘param16’: ‘thomas.mohr@mohrkeg.co.at’, ‘param17’: ‘thomas.mohr@mohrkeg.co.at’, ‘param18’: ‘1’, ‘param19’: ‘Payable’, ‘param20’: ‘359000 - Verrechnung Finanzamt - S-DTM’, ‘param21’: ‘Supplier’, ‘param22’: ‘Finanzamt Baden Mödling’, ‘param23’: ‘Journal Entry’, ‘param24’: ‘ACC-JV-2022-00001’, ‘param25’: ‘Journal Entry’, ‘param26’: ‘ACC-JV-2022-00001’, ‘param27’: ‘EUR’, ‘param28’: ‘ScienceConsult - DI Thomas Mohr KG’, ‘param29’: ‘Main - S-DTM’, ‘param30’: ‘’, ‘param31’: ‘thomas.mohr@mohrkeg.co.at’, ‘param32’: ‘thomas…
as_dict = 0
as_list = 0
formatted = 0
debug = False
ignore_ddl = 0
as_utf8 = 0
auto_commit = 0
update = None
explain = False
run = True
pluck = False
as_iterator = False
trace_id = None
File “/srv/frappe-bench/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py”, line 153, in execute
result = self._query(query)
self = <pymysql.cursors.Cursor object at 0x7f3364003f10>
query = "INSERT INTO tabPayment Ledger Entry
(name
,creation
,modified
,modified_by
,owner
,docstatus
,posting_date
,account_type
,account
,party_type
,party
,voucher_type
,voucher_no
,against_voucher_type
,against_voucher_no
,amount
,amount_in_account_currency
,account_currency
,company
,cost_center
,due_date
,finance_book
,remarks
) VALUES (0,‘2023-11-19T22:08:32.830312’,‘2023-11-19T22:08:32.830312’,‘thomas.mohr@mohrkeg.co.at’,‘thomas.mohr@mohrkeg.co.at’,‘1’,‘2022-01-01’,‘Receivable’,‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’,‘Customer’,‘Medizinische Universität Wien’,‘Journal Entry’,‘ACC-JV-2022-00001’,‘Journal Entry’,‘ACC-JV-2022-00001’,10564.8,10564.8,‘EUR’,‘ScienceConsult - DI Thomas Mohr KG’,‘Main - S-DTM’,NULL,NULL,’’),(1,‘2023-11-19T22:08:32.891472’,‘2023-11-19T22:08:32.891472’,‘thomas.mohr@mohrkeg.co.at’,‘thomas.mohr@mohrkeg.co.at’,‘1’,‘2022-01-01’,‘Payable’,‘359000 - Verrechnung Finanzamt - S-DTM’,‘Supplier’,‘Finanzamt Baden Mödling’,‘Journal…
args = {‘param1’: ‘thomas.mohr@mohrkeg.co.at’, ‘param2’: ‘thomas.mohr@mohrkeg.co.at’, ‘param3’: ‘1’, ‘param4’: ‘Receivable’, ‘param5’: ‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’, ‘param6’: ‘Customer’, ‘param7’: ‘Medizinische Universität Wien’, ‘param8’: ‘Journal Entry’, ‘param9’: ‘ACC-JV-2022-00001’, ‘param10’: ‘Journal Entry’, ‘param11’: ‘ACC-JV-2022-00001’, ‘param12’: ‘EUR’, ‘param13’: ‘ScienceConsult - DI Thomas Mohr KG’, ‘param14’: ‘Main - S-DTM’, ‘param15’: ‘’, ‘param16’: ‘thomas.mohr@mohrkeg.co.at’, ‘param17’: ‘thomas.mohr@mohrkeg.co.at’, ‘param18’: ‘1’, ‘param19’: ‘Payable’, ‘param20’: ‘359000 - Verrechnung Finanzamt - S-DTM’, ‘param21’: ‘Supplier’, ‘param22’: ‘Finanzamt Baden Mödling’, ‘param23’: ‘Journal Entry’, ‘param24’: ‘ACC-JV-2022-00001’, ‘param25’: ‘Journal Entry’, ‘param26’: ‘ACC-JV-2022-00001’, ‘param27’: ‘EUR’, ‘param28’: ‘ScienceConsult - DI Thomas Mohr KG’, ‘param29’: ‘Main - S-DTM’, ‘param30’: ‘’, ‘param31’: ‘thomas.mohr@mohrkeg.co.at’, ‘param32’: ‘thomas…
File “/srv/frappe-bench/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py”, line 322, in _query
conn.query(q)
self = <pymysql.cursors.Cursor object at 0x7f3364003f10>
q = "INSERT INTO tabPayment Ledger Entry
(name
,creation
,modified
,modified_by
,owner
,docstatus
,posting_date
,account_type
,account
,party_type
,party
,voucher_type
,voucher_no
,against_voucher_type
,against_voucher_no
,amount
,amount_in_account_currency
,account_currency
,company
,cost_center
,due_date
,finance_book
,remarks
) VALUES (0,‘2023-11-19T22:08:32.830312’,‘2023-11-19T22:08:32.830312’,‘thomas.mohr@mohrkeg.co.at’,‘thomas.mohr@mohrkeg.co.at’,‘1’,‘2022-01-01’,‘Receivable’,‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’,‘Customer’,‘Medizinische Universität Wien’,‘Journal Entry’,‘ACC-JV-2022-00001’,‘Journal Entry’,‘ACC-JV-2022-00001’,10564.8,10564.8,‘EUR’,‘ScienceConsult - DI Thomas Mohr KG’,‘Main - S-DTM’,NULL,NULL,’’),(1,‘2023-11-19T22:08:32.891472’,‘2023-11-19T22:08:32.891472’,‘thomas.mohr@mohrkeg.co.at’,‘thomas.mohr@mohrkeg.co.at’,‘1’,‘2022-01-01’,‘Payable’,‘359000 - Verrechnung Finanzamt - S-DTM’,‘Supplier’,‘Finanzamt Baden Mödling’,‘Journal…
conn = <pymysql.connections.Connection object at 0x7f3364003e50>
File “/srv/frappe-bench/frappe-bench/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 0x7f3364003e50>
sql = b"INSERT INTO tabPayment Ledger Entry
(name
,creation
,modified
,modified_by
,owner
,docstatus
,posting_date
,account_type
,account
,party_type
,party
,voucher_type
,voucher_no
,against_voucher_type
,against_voucher_no
,amount
,amount_in_account_currency
,account_currency
,company
,cost_center
,due_date
,finance_book
,remarks
) VALUES (0,‘2023-11-19T22:08:32.830312’,‘2023-11-19T22:08:32.830312’,‘thomas.mohr@mohrkeg.co.at’,‘thomas.mohr@mohrkeg.co.at’,‘1’,‘2022-01-01’,‘Receivable’,‘200000 - Forderungen aus Lief. und Leist. Inland - S-DTM’,‘Customer’,‘Medizinische Universit\xc3\xa4t Wien’,‘Journal Entry’,‘ACC-JV-2022-00001’,‘Journal Entry’,‘ACC-JV-2022-00001’,10564.8,10564.8,‘EUR’,‘ScienceConsult - DI Thomas Mohr KG’,‘Main - S-DTM’,NULL,NULL,’’),(1,‘2023-11-19T22:08:32.891472’,‘2023-11-19T22:08:32.891472’,‘thomas.mohr@mohrkeg.co.at’,‘thomas.mohr@mohrkeg.co.at’,‘1’,‘2022-01-01’,‘Payable’,‘359000 - Verrechnung Finanzamt - S-DTM’,‘Supplier’,‘Finanzamt Baden M\xc3\xb6…
unbuffered = False
File “/srv/frappe-bench/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 825, in _read_query_result
result.read()
self = <pymysql.connections.Connection object at 0x7f3364003e50>
unbuffered = False
result = <pymysql.connections.MySQLResult object at 0x7f336301e140>
File “/srv/frappe-bench/frappe-bench/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 0x7f336301e140>
File “/srv/frappe-bench/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 775, in _read_packet
packet.raise_for_error()
self = <pymysql.connections.Connection object at 0x7f3364003e50>
packet_type = <class ‘pymysql.protocol.MysqlPacket’>
buff = bytearray(b"\xff&\x04#23000Duplicate entry '0' for key 'PRIMARY'")
packet_header = b’.\x00\x00\x01’
btrl = 46
btrh = 0
packet_number = 1
bytes_to_read = 46
recv_data = b"\xff&\x04#23000Duplicate entry ‘0’ for key ‘PRIMARY’"
packet = <pymysql.protocol.MysqlPacket object at 0x7f336301e050>
File “/srv/frappe-bench/frappe-bench/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 0x7f336301e050>
errno = 1062
File “/srv/frappe-bench/frappe-bench/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 ‘0’ for key ‘PRIMARY’"
errno = 1062
errval = “Duplicate entry ‘0’ for key ‘PRIMARY’”
errorclass = <class ‘pymysql.err.IntegrityError’>
pymysql.err.IntegrityError: (1062, “Duplicate entry ‘0’ for key ‘PRIMARY’”)
Executing erpnext.patches.v14_0.migrate_gl_to_payment_ledger in erp2.mohrkeg.co.at (erpnext)
Description:
Migrate records from `tabGL Entry` to `tabPayment Ledger Entry`.
Patch is non-resumable. if patch failed or is terminatted abnormally, clear 'tabPayment Ledger Entry' table manually before re-running. Re-running is safe only during V13->V14 update.
Note: Post successful migration to V14, re-running is NOT-SAFE and SHOULD NOT be attempted.
Migrating 504 GL Entries to Payment Ledger
Migration Failed. Clear tabPayment Ledger Entry
table before re-running
The primary key in tabGL is not duplicated. Any idea what is going wrong?
best,
Thomas