Customize Employee Form

I try to add a custom field of “Preferred English Name” after Full Name. After save, the table collapsed.

Version. 10.1.23

=============
Something went wrong
Server Error: Please check your server logs or contact tech support.
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/reportview.py”, line 21, in get
data = compress(execute(**args), args = args)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/reportview.py”, line 26, in execute
return DatabaseQuery(doctype).execute(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 88, in execute
result = self.build_and_run()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 100, in build_and_run
args = self.prepare_args()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 118, in prepare_args
self.set_optional_columns()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 248, in set_optional_columns
columns = frappe.db.get_table_columns(self.doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 849, in get_table_columns
return self.get_db_table_columns(‘tab’ + doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 845, in get_db_table_columns
return [r[0] for r in self.sql(“DESC %s” % table)]
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 176, in sql
self._cursor.execute(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 165, in execute
result = self._query(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 321, in _query
conn.query(q)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 860, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1061, in _read_query_result
result.read()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1349, in read
first_packet = self.connection._read_packet()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1018, in _read_packet
packet.check_error()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 384, in check_error
err.raise_mysql_exception(self._data)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 107, in raise_mysql_exception
raise errorclass(errno, errval)
InternalError: (1932, u"Table ‘1bd3e0294da19198.tabEmployee’ doesn’t exist in engine")

when I use Bench Mysql, then Show Tables;, the table of Tables_in_1bd3e0294da19198 has tabEmployee.

I’ve no idea why it’s saying the table doesn’t exist and how it can be solved.

Btw, I use ERPNext inside Docker.

hi ,

Create Custom filed from > Setup >Custom field and create

Yes I use this form to create the new field. However, after the creation, then the error prompt and saying the table is missing. I don’t know what happens and can’t sort out a solution to fix this.

@lincogn,

How about use the Customize Form?

Hi ,
I think you need to select Datatype > data instead of table

It’s strange, this problem seems happens only occur in the first edit of Employee form. May I know how can I restore the employee table in this case? If mysql shows there is a table already, how the system link back to the employee table?

Hi ,

Can you share me the screen shoot of that custom-filed which you created

It cannot be created now as the table cannot be linked already. It’s believed there is some issue on the docker and I am figuring out what happens.

I use the following docker / image to build the system:
https://hub.docker.com/r/lukptr/erpnext7/builds/

Confusing…