Hi when try to add a new field item master it didnot save and shows this error

Hi What does this error says,

Traceback (innermost last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/widgets/form/save.py”, line 18, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 216, in save
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 449, in run_post_save_methods
self.run_method(“on_update”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 412, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 496, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 479, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 406, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 87, in on_update
updatedb(self.name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 396, in updatedb
tab.sync()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 177, in sync
self.alter()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 217, in alter
frappe.db.sql(“alter table {} {}”.format(self.name, ", ".join(query)))
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 121, in sql
self._cursor.execute(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1118, ‘Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs’)

Traceback (innermost last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 49, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 66, in handle
execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 89, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 532, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/widgets/form/save.py”, line 18, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 216, in save
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 449, in run_post_save_methods
self.run_method(“on_update”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 412, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 496, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 479, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 406, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 87, in on_update
updatedb(self.name)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 396, in updatedb
tab.sync()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 177, in sync
self.alter()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 217, in alter
frappe.db.sql(“alter table {} {}”.format(self.name, ", ".join(query)))
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 121, in sql
self._cursor.execute(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1118, ‘Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs’)

How many custom field you have added on this from?

Hi Thanks for your Reply,

In customize form i have added 122 fields and i have deleted the 2 fields and try to add 1 but now also i am getting the same error. currently in customize form it has 120 fields.

May i know the reason why even after deleting the two fields i cannot able to add the one field.

There is a limit on how many fields you can add (its a hard limit by MariaDB)

For deleting field, Please check field is also deleted from database.

HI Thanks for your reply, I will check and revert back.

Hi When renaming the already saved field name is not saved and it shows the same operational error.

@Dhamu try renaming using custom field.

Did you check whether the field are removed from database?

@kolate_sambhaji
Hi I have exactly the same issue. Field are not deleted from the database. Should I DROP those column manually (with SQL command DROP COLUMN) or is there a smother way to deal with this?
thx in advance !

@lleleu deleting column using SQL command should be last option.
If you want to delete column follow this step (at your own risk)

  1. go to custom field, delete field from custom field list
  2. open sql command prompt and delete custom column using SQL command.

follow above step only if you have following error, also while deleting field from table, do not delete Standard Fields

 OperationalError: (1118, 'Row size too large. The
 maximum row size for the used table type, not counting BLOBs, is 65535.
 You have to change some columns to TEXT or BLOBs')

Be careful while writing sql command.
Smoother way is write patch for your requirement.

@kolate_sambhaji
What if I want to have the fields and not to delete?

Edit: What if I decrease the size of Varchar(140) to Varchar(25), will it going to create any issue in future updates?

Regards
Ruchin Sharma

I have same issue:
Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [================= ]

There was an issue while migrating the DocType: Employee

Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main ”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/naztech/naztech-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/naztech/naztech-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/naztech/naztech-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/naztech/naztech-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/naztech/naztech-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/naztech/naztech-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/naztech/naztech-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/naztech/naztech-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/naztech/naztech-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/naztech/naztech-bench/apps/frappe/frappe/commands/ init .py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/naztech/naztech-bench/apps/frappe/frappe/commands/site.py”, line 228, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/naztech/naztech-bench/apps/frappe/frappe/migrate.py”, line 49, in migrate
frappe.model.sync.sync_all(verbose=verbose)
File “/home/naztech/naztech-bench/apps/frappe/frappe/model/sync.py”, line 19, in sync_all
sync_for(app, force, verbose=verbose, reset_permissions=reset_permissions)
File “/home/naztech/naztech-bench/apps/frappe/frappe/model/sync.py”, line 56, in sync_for
reset_permissions=reset_permissions, for_sync=True)
File “/home/naztech/naztech-bench/apps/frappe/frappe/modules/import_file.py”, line 65, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “/home/naztech/naztech-bench/apps/frappe/frappe/modules/import_file.py”, line 132, in import_doc
doc.insert()
File “/home/naztech/naztech-bench/apps/frappe/frappe/model/document.py”, line 249, in insert
self.run_post_save_methods()
File “/home/naztech/naztech-bench/apps/frappe/frappe/model/document.py”, line 905, in run_post_save_methods
self.run_method(“on_update”)
File “/home/naztech/naztech-bench/apps/frappe/frappe/model/document.py”, line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/naztech/naztech-bench/apps/frappe/frappe/model/document.py”, line 1048, in composer
return composed(self, method, *args, **kwargs)
File “/home/naztech/naztech-bench/apps/frappe/frappe/model/document.py”, line 1031, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/naztech/naztech-bench/apps/frappe/frappe/model/document.py”, line 766, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/naztech/naztech-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 243, in on_update
raise e
pymysql.err.InternalError: (1118, u’Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs’)

What can I do?
Thanks

@abu.sayeed hi i am getting the same error while i am using the latest version 13.
did you got any solution for that particular error??
if you get please response i am stuck while trying different solutions.
thanks in advance