peterg
March 19, 2024, 10:31am
1
Hi all, I’m posting this message in case anyone else is running into the problems I am. It took a while to figure out what was going on, and I’m hoping to save others that trouble.
There was an unannounced API change in version 15.17 that changes the parameter pattern of a public hook interface, and as a consequence any apps that don’t update their use of this hook may break Bank Reconciliation entirely.
At the moment, I’m seeing this issue in the Lending app, but it may affect other apps too.
opened 03:16PM - 16 Mar 24 UTC
closed 06:00AM - 19 Mar 24 UTC
bug
fixed
### Information about bug
When trying to do a bank reconciliation using the rec… onciliation tool the following error is generated when I click on actions for any transaction:
"exception": "TypeError: get_matching_queries() takes from 5 to 11 positional arguments but 12 were given",
"exc_type": "TypeError",
"_exc_source": "erpnext (app)""
### Module
accounts
### Version
"erpnext": "15.17.0",
"frappe": "15.17.3",
"hrms": "15.13.0",
"print_designer": "1.0.0"
### Installation method
None
### Relevant log output / Stack trace / Full Error Message.
```shell
### App Versions
{
"erpnext": "15.17.0",
"frappe": "15.17.3",
"hrms": "15.13.0",
"print_designer": "1.0.0"
}
```
### Route
```
Form/Bank Reconciliation Tool/Bank Reconciliation Tool
```
### Traceback
```
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 110, in application
response = frappe.api.handle(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/api/__init__.py", line 49, in handle
data = endpoint(**arguments)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
return frappe.handler.handle()
^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/handler.py", line 49, in handle
data = execute_cmd(cmd)
^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/__init__.py", line 1716, in call
return fn(*args, **newargs)
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/erpnext/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py", line 471, in get_linked_payments
matching = check_matching(
^^^^^^^^^^^^^^^
File "apps/erpnext/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py", line 523, in check_matching
queries = get_queries(
^^^^^^^^^^^^
File "apps/erpnext/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py", line 566, in get_queries
frappe.get_attr(method_name)(
TypeError: get_matching_queries() takes from 5 to 11 positional arguments but 12 were given
```
### Request Data
```
{
"type": "POST",
"args": {
"bank_transaction_name": "ACC-BTN-2024-00983",
"document_types": "[\"payment_entry\",\"journal_entry\"]",
"from_date": "2024-02-01",
"to_date": "2024-03-16",
"filter_by_reference_date": 0
},
"headers": {},
"error_handlers": {},
"url": "/api/method/erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_linked_payments",
"request_id": null
}
```
### Response Data
```
{
"exception": "TypeError: get_matching_queries() takes from 5 to 11 positional arguments but 12 were given",
"exc_type": "TypeError",
"_exc_source": "erpnext (app)"
}
```
```
opened 10:27AM - 19 Mar 24 UTC
bug
### Information about bug
Due to an unannounced API change in ERPNext 15.17, th… e hook method `lending.loan_management.utils.get_matching_queries` now causes the Bank Reconciliation tool to break on all sites using the Lending app.
Fixing this issue will require updating the method to use the new parameter requirements.
https://github.com/frappe/erpnext/issues/40493
### Module
Loan Management
### Version
ERPNext 15.17
### Installation method
None
### Relevant log output / Stack trace / Full Error Message.
_No response_
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
2 Likes
Ran into the same issue, it seems has yet to be fixed.