Hello folks!
I’m update the student data with the respective guardian and seems all looking good.
However, when I try to access the correspondent record of the guardian, I’ve received the error below.
Someone knows how to fix this?
Thanks in advance.
Eduardo Kuniyoshi
Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 69, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 54, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 45, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 83, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1598, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/desk/form/load.py”, line 37, in getdoc
doc = frappe.get_doc(doctype, name)
File “apps/frappe/frappe/init.py”, line 1189, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 74, in get_doc
return controller(*args, **kwargs)
File “apps/frappe/frappe/model/document.py”, line 106, in init
self.load_from_db()
File “apps/frappe/frappe/model/document.py”, line 152, in load_from_db
super().init(d)
File “apps/frappe/frappe/model/base_document.py”, line 113, in init
self.setup()
File “apps/education/education/education/doctype/guardian/guardian.py”, line 13, in setup
self.onload()
File “apps/education/education/education/doctype/guardian/guardian.py”, line 17, in onload
self.load_students()
File “apps/education/education/education/doctype/guardian/guardian.py”, line 30, in load_students
“student_name”: frappe.db.get_value(“Student”, student.parent, “title”),
File “apps/frappe/frappe/database/database.py”, line 473, in get_value
result = self.get_values(
File “apps/frappe/frappe/database/database.py”, line 570, in get_values
out = self._get_values_from_table(
File “apps/frappe/frappe/database/database.py”, line 800, in _get_values_from_table
return self.sql(query, as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
File “apps/frappe/frappe/database/database.py”, line 207, in sql
self._cursor.execute(query, values)
File “env/lib/python3.10/site-packages/pymysql/cursors.py”, line 148, in execute
result = self._query(query)
File “env/lib/python3.10/site-packages/pymysql/cursors.py”, line 310, in _query
conn.query(q)
File “env/lib/python3.10/site-packages/pymysql/connections.py”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “env/lib/python3.10/site-packages/pymysql/connections.py”, line 775, in _read_query_result
result.read()
File “env/lib/python3.10/site-packages/pymysql/connections.py”, line 1156, in read
first_packet = self.connection._read_packet()
File “env/lib/python3.10/site-packages/pymysql/connections.py”, line 725, in _read_packet
packet.raise_for_error()
File “env/lib/python3.10/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File “env/lib/python3.10/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, “Unknown column ‘title’ in ‘field list’”)