Hi,
we did:
bench update
bench migrate-to-v5
update worked OK and the command migrate-to-v5
is available but after migrating, we get in the website “Updating. We will be back in a few moments…”:
And the error in console is:
Executing erpnext.patches.v4_4.make_email_accounts in ourdomain.com (ourdomain.com)
Traceback (most recent call last):
File "/home/erpnext/frappe-bench/env/bin/frappe", line 9, in <module>
load_entry_point('frappe==4.6.1', 'console_scripts', 'frappe')()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/cli.py", line 40, in main
ret = run(fn, args)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/cli.py", line 84, in run
out = globals().get(fn)(**args)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/cli.py", line 68, in new_fn
return fn(*args, **new_kwargs)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/cli.py", line 443, in latest
frappe.modules.patch_handler.run_all()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
if not run_single(patchmodule = patch):
File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
frappe.get_attr(patchmodule.split()[0] + ".execute")()
File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/patches/v4_4/make_email_accounts.py", line 49, in execute
account.insert()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 206, in insert
self.db_insert()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/base_document.py", line 197, in db_insert
), d.values())
File "/home/erpnext/frappe-bench/apps/frappe/frappe/database.py", line 129, in sql
self._cursor.execute(query, values)
File "/home/erpnext/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/home/erpnext/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
frappe.exceptions.NameError: ('Email Account', u'Dialog', IntegrityError(1062, "Duplicate entry 'Dialog' for key 'PRIMARY'"))
Error: None
Traceback (most recent call last):
File "/bin/bench", line 9, in <module>
load_entry_point('bench==0.1', 'console_scripts', 'bench')()
File "/home/erpnext/bench-repo/bench/cli.py", line 38, in cli
return bench()
File "/usr/lib64/python2.7/site-packages/click/core.py", line 610, in __call__
return self.main(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 590, in main
rv = self.invoke(ctx)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib64/python2.7/site-packages/click/core.py", line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 416, in invoke
return callback(*args, **kwargs)
File "/home/erpnext/bench-repo/bench/cli.py", line 170, in update
patch_sites()
File "/home/erpnext/bench-repo/bench/utils.py", line 91, in patch_sites
exec_cmd("{frappe} --latest all".format(frappe=get_frappe(bench=bench)), cwd=os.path.join(bench, 'sites'))
File "/home/erpnext/bench-repo/bench/utils.py", line 61, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/home/erpnext/frappe-bench/env/bin/frappe --latest all' returned non-zero exit status 1
Error: None
Traceback (most recent call last):
File "/bin/bench", line 9, in <module>
load_entry_point('bench==0.1', 'console_scripts', 'bench')()
File "/home/erpnext/bench-repo/bench/cli.py", line 38, in cli
return bench()
File "/usr/lib64/python2.7/site-packages/click/core.py", line 610, in __call__
return self.main(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 590, in main
rv = self.invoke(ctx)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib64/python2.7/site-packages/click/core.py", line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 416, in invoke
return callback(*args, **kwargs)
File "/home/erpnext/bench-repo/bench/cli.py", line 208, in _migrate_to_v5
migrate_to_v5(bench=bench)
File "/home/erpnext/bench-repo/bench/migrate_to_v5.py", line 16, in migrate_to_v5
exec_cmd("{bench} update".format(bench=sys.argv[0]))
File "/home/erpnext/bench-repo/bench/utils.py", line 61, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/bin/bench update' returned non-zero exit status 1