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…
Migrating biz.tecobytes.com
Executing erpnext.patches.v11_0.move_item_defaults_to_child_table_for_multicompany #02-07-2018 in biz.tecobytes.com (4657b9a643a93473)
Traceback (most recent call last):
File “/usr/lib64/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib64/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/opt/bench/erpnext/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/opt/bench/erpnext/env/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/commands/site.py”, line 222, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/opt/bench/erpnext/apps/frappe/frappe/migrate.py”, line 39, in migrate
frappe.modules.patch_handler.run_all()
File “/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/opt/bench/erpnext/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/opt/bench/erpnext/apps/erpnext/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py”, line 64, in execute
child_doc.db_insert()
File “/opt/bench/erpnext/apps/frappe/frappe/model/base_document.py”, line 314, in db_insert
raise frappe.DuplicateEntryError(self.doctype, self.name, 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.

image

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.

2 Likes

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

2 Likes