Getting this error log
attached image shows status after processing.
App Versions
{
"education": "15.5.0",
"erpnext": "15.44.0",
"frappe": "15.48.1",
"hrms": "16.0.0-dev"
}
Route
Form/Fee Schedule/EDU-FSH-2024-00001
Traceback
Traceback (most recent call last):
File "apps/education/education/education/doctype/fee_schedule/fee_schedule.py", line 182, in generate_fees
create_sales_invoice(fee_schedule, student_id)
File "apps/education/education/education/doctype/fee_schedule/fee_schedule.py", line 236, in create_sales_invoice
sales_invoice_doc.submit()
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1052, in submit
return self._submit()
^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1035, in _submit
return self.save()
^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 341, in save
return self._save(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 394, in _save
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1135, in run_post_save_methods
self.run_method("on_submit")
File "apps/frappe/frappe/model/document.py", line 966, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1326, in composer
return composed(self, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1308, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 963, in fn
return method_object(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 463, in on_submit
self.make_gl_entries()
File "apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py", line 1183, in make_gl_entries
make_gl_entries(
File "apps/erpnext/erpnext/accounts/general_ledger.py", line 48, in make_gl_entries
save_entries(gl_map, adv_adj, update_outstanding, from_repost)
File "apps/erpnext/erpnext/accounts/general_ledger.py", line 371, in save_entries
validate_against_pcv(is_opening, gl_map[0]["posting_date"], gl_map[0]["company"])
File "apps/erpnext/erpnext/accounts/general_ledger.py", line 727, in validate_against_pcv
last_pcv_date = frappe.db.get_value(
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/database/database.py", line 514, in get_value
result = self.get_values(
^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/database/database.py", line 618, in get_values
out = self._get_values_from_table(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/database/database.py", line 891, in _get_values_from_table
return query.run(as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/database/database.py", line 229, in sql
self._cursor.execute(query, values)
File "env/lib/python3.12/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File "env/lib/python3.12/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "env/lib/python3.12/site-packages/pymysql/connections.py", line 563, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.12/site-packages/pymysql/connections.py", line 825, in _read_query_result
result.read()
File "env/lib/python3.12/site-packages/pymysql/connections.py", line 1199, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.12/site-packages/pymysql/connections.py", line 775, in _read_packet
packet.raise_for_error()
File "env/lib/python3.12/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "env/lib/python3.12/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, "Unknown column 'period_end_date' in 'field list'")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 114, 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 1725, in call
return fn(*args, **newargs)
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/handler.py", line 331, in run_doc_method
response = doc.run_method(method)
^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 966, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1326, in composer
return composed(self, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1308, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 963, in fn
return method_object(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/education/education/education/doctype/fee_schedule/fee_schedule.py", line 158, in create_fees
generate_fees(self.name)
File "apps/education/education/education/doctype/fee_schedule/fee_schedule.py", line 193, in generate_fees
frappe.local.message_log and "\n\n".join(frappe.local.message_log) or cstr(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 0: expected str instance, _dict found
Request Data
{
"type": "POST",
"args": {
"docs": "{\"name\":\"EDU-FSH-2024-00001\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":0,\"fee_structure\":\"EDU-FST-2024-00027\",\"posting_date\":\"2024-12-17\",\"due_date\":\"2025-01-01\",\"naming_series\":\"EDU-FSH-.YYYY.-\",\"send_email\":0,\"program\":\"GRADE 6\",\"academic_year\":\"2025\",\"academic_term\":\"2025 (TERM 1)\",\"currency\":\"KES\",\"total_amount\":20715,\"grand_total\":20715,\"grand_total_in_words\":\"KES Twenty Thousand, Seven Hundred And Fifteen only.\",\"letter_head\":\"FEES LETTER HEAD\",\"receivable_account\":\"Debtors - EKB\",\"company\":\"EAPC KIGUMO BOARDING\",\"cost_center\":\"Main - EKB\",\"status\":\"Invoice Pending\",\"doctype\":\"Fee Schedule\",\"components\":[{\"name\":\"6n7vukktf0\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":1,\"fees_category\":\"Boarding\",\"amount\":13948,\"item\":\"Boarding\",\"discount\":0,\"total\":13948,\"parent\":\"EDU-FSH-2024-00001\",\"parentfield\":\"components\",\"parenttype\":\"Fee Schedule\",\"doctype\":\"Fee Component\"},{\"name\":\"205n5edohh\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":2,\"fees_category\":\"E.W.C\",\"amount\":699,\"item\":\"E.W.C\",\"discount\":0,\"total\":699,\"parent\":\"EDU-FSH-2024-00001\",\"parentfield\":\"components\",\"parenttype\":\"Fee Schedule\",\"doctype\":\"Fee Component\"},{\"name\":\"m04pdq1r2u\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":3,\"fees_category\":\"Personal Emolument\",\"amount\":2334,\"item\":\"Personal Emolument\",\"discount\":0,\"total\":2334,\"parent\":\"EDU-FSH-2024-00001\",\"parentfield\":\"components\",\"parenttype\":\"Fee Schedule\",\"doctype\":\"Fee Component\"},{\"name\":\"rkaqdcvda0\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":4,\"fees_category\":\"SES & Quality Assurance\",\"amount\":250,\"item\":\"SES & Quality Assurance\",\"discount\":0,\"total\":250,\"parent\":\"EDU-FSH-2024-00001\",\"parentfield\":\"components\",\"parenttype\":\"Fee Schedule\",\"doctype\":\"Fee Component\"},{\"name\":\"ehfud70kj8\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":5,\"fees_category\":\"L.T & T\",\"amount\":120,\"item\":\"L.T & T\",\"discount\":0,\"total\":120,\"parent\":\"EDU-FSH-2024-00001\",\"parentfield\":\"components\",\"parenttype\":\"Fee Schedule\",\"doctype\":\"Fee Component\"},{\"name\":\"59udh9b8df\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":6,\"fees_category\":\"R.M.I\",\"amount\":200,\"item\":\"R.M.I\",\"discount\":0,\"total\":200,\"parent\":\"EDU-FSH-2024-00001\",\"parentfield\":\"components\",\"parenttype\":\"Fee Schedule\",\"doctype\":\"Fee Component\"},{\"name\":\"jl1lppfq60\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":7,\"fees_category\":\"Tel, Postage & Box Rental\",\"amount\":114,\"item\":\"Tel, Postage & Box Rental\",\"discount\":0,\"total\":114,\"parent\":\"EDU-FSH-2024-00001\",\"parentfield\":\"components\",\"parenttype\":\"Fee Schedule\",\"doctype\":\"Fee Component\"},{\"name\":\"j6i2e1gam6\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":8,\"fees_category\":\"ICT\",\"amount\":500,\"item\":\"ICT\",\"discount\":0,\"total\":500,\"parent\":\"EDU-FSH-2024-00001\",\"parentfield\":\"components\",\"parenttype\":\"Fee Schedule\",\"doctype\":\"Fee Component\"},{\"name\":\"c0v41d1il8\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":9,\"fees_category\":\"Administration Costs\",\"amount\":1950,\"item\":\"Administration Costs\",\"discount\":0,\"total\":1950,\"parent\":\"EDU-FSH-2024-00001\",\"parentfield\":\"components\",\"parenttype\":\"Fee Schedule\",\"doctype\":\"Fee Component\"},{\"name\":\"j3v2m5flkn\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":10,\"fees_category\":\"Insurance\",\"amount\":400,\"item\":\"Insurance\",\"discount\":0,\"total\":400,\"parent\":\"EDU-FSH-2024-00001\",\"parentfield\":\"components\",\"parenttype\":\"Fee Schedule\",\"doctype\":\"Fee Component\"},{\"name\":\"jj5e7hf0cj\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":11,\"fees_category\":\"Activity\",\"amount\":200,\"item\":\"Activity\",\"discount\":0,\"total\":200,\"parent\":\"EDU-FSH-2024-00001\",\"parentfield\":\"components\",\"parenttype\":\"Fee Schedule\",\"doctype\":\"Fee Component\"}],\"student_groups\":[{\"name\":\"gs8q0on2ok\",\"owner\":\"Administrator\",\"creation\":\"2024-12-17 12:14:59.697061\",\"modified\":\"2024-12-17 12:15:04.625945\",\"modified_by\":\"Administrator\",\"docstatus\":1,\"idx\":1,\"student_group\":\"GRADE 10 BOARDING\",\"total_students\":\"1\",\"parent\":\"EDU-FSH-2024-00001\",\"parentfield\":\"student_groups\",\"parenttype\":\"Fee Schedule\",\"doctype\":\"Fee Schedule Student Group\"}],\"__onload\":{\"dashboard_info\":{\"total_paid\":0,\"total_unpaid\":0,\"currency\":\"KES\"}},\"__last_sync_on\":\"2024-12-19T07:24:00.785Z\"}",
"method": "create_fees"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/run_doc_method",
"request_id": null
}
Response Data
{
"exception": "TypeError: sequence item 0: expected str instance, _dict found",
"exc_type": "TypeError",
"_exc_source": "education (app)",
"_server_messages": "[\"{\\\"message\\\": \\\"Item Price added for Boarding in Price List Standard Selling\\\", \\\"title\\\": \\\"Message\\\", \\\"alert\\\": 1}\", \"{\\\"message\\\": \\\"Item Price added for E.W.C in Price List Standard Selling\\\", \\\"title\\\": \\\"Message\\\", \\\"alert\\\": 1}\", \"{\\\"message\\\": \\\"Item Price added for Personal Emolument in Price List Standard Selling\\\", \\\"title\\\": \\\"Message\\\", \\\"alert\\\": 1}\", \"{\\\"message\\\": \\\"Item Price added for SES & Quality Assurance in Price List Standard Selling\\\", \\\"title\\\": \\\"Message\\\", \\\"alert\\\": 1}\", \"{\\\"message\\\": \\\"Item Price added for L.T & T in Price List Standard Selling\\\", \\\"title\\\": \\\"Message\\\", \\\"alert\\\": 1}\", \"{\\\"message\\\": \\\"Item Price added for R.M.I in Price List Standard Selling\\\", \\\"title\\\": \\\"Message\\\", \\\"alert\\\": 1}\", \"{\\\"message\\\": \\\"Item Price added for Tel, Postage & Box Rental in Price List Standard Selling\\\", \\\"title\\\": \\\"Message\\\", \\\"alert\\\": 1}\", \"{\\\"message\\\": \\\"Item Price added for ICT in Price List Standard Selling\\\", \\\"title\\\": \\\"Message\\\", \\\"alert\\\": 1}\", \"{\\\"message\\\": \\\"Item Price added for Administration Costs in Price List Standard Selling\\\", \\\"title\\\": \\\"Message\\\", \\\"alert\\\": 1}\", \"{\\\"message\\\": \\\"Item Price added for Insurance in Price List Standard Selling\\\", \\\"title\\\": \\\"Message\\\", \\\"alert\\\": 1}\", \"{\\\"message\\\": \\\"Item Price added for Activity in Price List Standard Selling\\\", \\\"title\\\": \\\"Message\\\", \\\"alert\\\": 1}\"]"
}