Getting errors in Education App

I am getting lot of error in the Education App.

Here is ne of the error that I am getting when trying to create a new Student.

App Versions

	"education": "0.0.1",
	"erpnext": "14.11.0",
	"frappe": "14.20.0",
	"hrms": "1.0.0",
	"india_compliance": "14.0.8",
	"payments": "0.0.1"




Traceback (most recent call last):
  File "apps/frappe/frappe/", line 69, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/", line 45, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/", line 83, in execute_cmd
    return, **frappe.form_dict)
  File "apps/frappe/frappe/", line 1590, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/", line 23, in savedocs
  File "apps/frappe/frappe/model/", line 304, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/", line 326, in _save
    return self.insert()
  File "apps/frappe/frappe/model/", line 258, in insert
  File "apps/frappe/frappe/model/", line 1039, in run_before_save_methods
  File "apps/frappe/frappe/model/", line 908, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/", line 1260, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/", line 1242, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/", line 905, in fn
    return method_object(*args, **kwargs)
  File "apps/education/education/education/doctype/student/", line 27, in validate
  File "apps/education/education/education/doctype/student/", line 57, in update_student_name_in_linked_doctype
  File "apps/frappe/frappe/database/", line 218, in sql
    self._cursor.execute(query, values)
  File "env/lib/python3.10/site-packages/pymysql/", line 148, in execute
    result = self._query(query)
  File "env/lib/python3.10/site-packages/pymysql/", line 310, in _query
  File "env/lib/python3.10/site-packages/pymysql/", line 548, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "env/lib/python3.10/site-packages/pymysql/", line 775, in _read_query_result
  File "env/lib/python3.10/site-packages/pymysql/", line 1156, in read
    first_packet = self.connection._read_packet()
  File "env/lib/python3.10/site-packages/pymysql/", line 725, in _read_packet
  File "env/lib/python3.10/site-packages/pymysql/", line 221, in raise_for_error
  File "env/lib/python3.10/site-packages/pymysql/", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, "Unknown column 'student' in 'where clause'")

Request Data

	"type": "POST",
	"args": {
		"doc": "{\"docstatus\":0,\"doctype\":\"Student\",\"name\":\"new-student-1\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"enabled\":1,\"naming_series\":\"EDU-STU-.YYYY.-\",\"joining_date\":\"2022-12-27\",\"blood_group\":\"\",\"country\":\"India\",\"first_name\":\"Student\",\"last_name\":\"One\",\"student_email_id\":\"\",\"gender\":\"Male\"}",
		"action": "Save"
	"btn": {
		"jQuery36000407205640406730351": {
			"events": {
				"click": [
						"type": "click",
						"origType": "click",
						"guid": 586,
						"namespace": ""
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/"

Response Data

	"exception": "pymysql.err.OperationalError: (1054, \"Unknown column 'student' in 'where clause'\")"

How to solve this problem?


1 Like

It seems there is some problem in this statement in the file

						"""UPDATE `tab{0}` set student_name = %s where {1} = %s""".format(
							d, linked_doctypes[d]["fieldname"][0]

Any idea what is the mistake in this statement?



I have not installed or used Education App but I think you need to replace the code as follows in file @ line # 57:

field = meta.get_field(linked_doctypes[d]["fieldname"][0])
if field:
     frappe.db.set_value(d,, "student_name", self.student_name)

Note: This code is courtesy of ChatGPT.


Yogi Yang

1 Like

@yogeshvachhani the issue has been resolved. fix: change title references to student_name by pateljannat · Pull Request #82 · frappe/education · GitHub

1 Like