Error while running Bench Update command

INFO:bench.utils:yarn install
yarn install v1.7.0
[1/4] Resolving packages…
success Already up-to-date.
Done in 0.77s.
Backing up sites…
Patching sites…
Executing erpnext.patches.v11_0.move_item_defaults_to_child_table_for_multicompany #02-07-2018 in (4657b9a643a93473)
Traceback (most recent call last):
File “/usr/lib64/python2.7/”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib64/python2.7/”, line 72, in _run_code
exec code in run_globals
File “/opt/bench/erpnext/apps/frappe/frappe/utils/”, line 97, in
File “/opt/bench/erpnext/apps/frappe/frappe/utils/”, line 18, in main
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/”, line 722, in call
return self.main(*args, **kwargs)
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/”, line 697, in main
rv = self.invoke(ctx)
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/”, line 535, in invoke
return callback(*args, **kwargs)
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/commands/”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/commands/”, line 222, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/opt/bench/erpnext/apps/frappe/frappe/”, line 39, in migrate
File “/opt/bench/erpnext/apps/frappe/frappe/modules/”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/opt/bench/erpnext/apps/frappe/frappe/modules/”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/opt/bench/erpnext/apps/frappe/frappe/modules/”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/opt/bench/erpnext/apps/erpnext/erpnext/patches/v11_0/”, line 64, in execute
File “/opt/bench/erpnext/apps/frappe/frappe/model/”, line 314, in db_insert
raise frappe.DuplicateEntryError(self.doctype,, e)
frappe.exceptions.DuplicateEntryError: (u’Item Default’, u’fbf73724bb’, IntegrityError(1062, u"Duplicate entry ‘fbf73724bb’ for key ‘PRIMARY’"))

Dear Team,

@rmehta @surajshetty @shreya115 @nabinhait

Kindly help me out in this issue as my whole company is stuck and are not able to move ahead. As it’s stuck in between bench update. Kindly help us out.


try running the bench update again

This issue m having since 2 days. and the screenshot i have provided is of 2 mins back.

Have a look at this post IntegrityError: (1062, "Duplicate entry 'Sales Taxes and Charges Template' for key 'PRIMARY'") - #6 by nabinhait and see if it helps.
The table is different, but the principle is the same (I think)

@vijaypatel Extremely sorry about the issue. We have fixed it, please try the update once again.


Thank you @shreya115 for your prompt response. I really like to help you out in any kind of help if required let me know.