Unable to Rename A Company: Too Many Write Requests

I am trying to rename a company but I am getting this error: frappe.exceptions.ValidationError: Too many writes in one request. Please send smaller requests.

Here’s the full traceback of the error

Traceback (most recent call last):
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/app.py”, line 67, in application
response = frappe.api.handle()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/api.py”, line 58, in handle
return frappe.handler.handle()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/handler.py”, line 30, in handle
data = execute_cmd(cmd)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/handler.py”, line 70, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 1134, in call
return fn(*args, **newargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 891, in rename_doc
return rename_doc(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/rename_doc.py”, line 69, in rename_doc
update_link_field_values(link_fields, old, new, doctype)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/rename_doc.py”, line 271, in update_link_field_values
frappe.db.set_value(parent, {docfield: old}, docfield, new)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/database/database.py”, line 666, in set_value
values, debug=debug)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/database/database.py”, line 125, in sql
self.check_transaction_status(query)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/database/database.py”, line 269, in check_transaction_status
frappe.throw(_(“Too many writes in one request. Please send smaller requests”), frappe.ValidationError)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 411, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 390, in msgprint
_raise_exception()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 344, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Too many writes in one request. Please send smaller requests

I don’t know how to fix this as this is not data I can batch upload. Any help to overcome this will be appreciated.

1 Like

I have solved this using steps found here. but I think bench should have native commands for this since this is not achievable from the frontend. I would assume some others would face this challenge with renaming and if there’s no error-proof method defined natively, trial and error could result in loss of data.