Bench migrate-to-v5 error

Hello,

I am trying to update to v5 to test it. I had a bench update error which I resolved it following this post: https://discuss.frappe.io/t/update-error-subprocess-calledprocesserror/3512/7

So now I get an error when executing the magical bench migrate-to-v5. It goes well until:

Executing execute:frappe.permissions.reset_perms("Stock Ledger Entry") #2014-06-09 in interforce1 (interforce1)
Success
Executing erpnext.patches.v4_4.make_email_accounts in interforce1 (interforce1)

and next thing displayed is this…

Executing erpnext.patches.v4_4.make_email_accounts in interforce1 (interforce1)
Traceback (most recent call last):
File “/home/administrator/frappe-bench/env/bin/frappe”, line 9, in
load_entry_point(‘frappe==4.10.0’, ‘console_scripts’, ‘frappe’)()
File “/home/administrator/frappe-bench/apps/frappe/frappe/cli.py”, line 40, in main
ret = run(fn, args)
File “/home/administrator/frappe-bench/apps/frappe/frappe/cli.py”, line 84, in run
out = globals().get(fn)(**args)
File “/home/administrator/frappe-bench/apps/frappe/frappe/cli.py”, line 68, in new_fn
return fn(*args, **new_kwargs)
File “/home/administrator/frappe-bench/apps/frappe/frappe/cli.py”, line 443, in latest
frappe.modules.patch_handler.run_all()
File “/home/administrator/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/administrator/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/administrator/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/administrator/frappe-bench/apps/erpnext/erpnext/patches/v4_4/make_email_accounts.py”, line 26, in execute
account.insert()
File “/home/administrator/frappe-bench/apps/frappe/frappe/model/document.py”, line 164, in insert
self.run_before_save_methods()
File “/home/administrator/frappe-bench/apps/frappe/frappe/model/document.py”, line 484, in run_before_save_methods
self.run_method(“validate”)
File “/home/administrator/frappe-bench/apps/frappe/frappe/model/document.py”, line 457, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/administrator/frappe-bench/apps/frappe/frappe/model/document.py”, line 560, in composer
return composed(self, method, *args, **kwargs)
File “/home/administrator/frappe-bench/apps/frappe/frappe/model/document.py”, line 543, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/administrator/frappe-bench/apps/frappe/frappe/model/document.py”, line 451, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/administrator/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py”, line 30, in validate
frappe.InvalidEmailAddressError)
File “/home/administrator/frappe-bench/apps/frappe/frappe/init.py”, line 234, in throw
msgprint(msg, raise_exception=exc)
File “/home/administrator/frappe-bench/apps/frappe/frappe/init.py”, line 227, in msgprint
_raise_exception()
File “/home/administrator/frappe-bench/apps/frappe/frappe/init.py”, line 211, in _raise_exception
raise raise_exception, msg
frappe.exceptions.InvalidEmailAddressError: interforcegroup is not a valid email id
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/administrator/bench-repo/bench/cli.py”, line 38, in cli
return bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/administrator/bench-repo/bench/cli.py”, line 172, in update
patch_sites()
File “/home/administrator/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/administrator/bench-repo/bench/utils.py”, line 61, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File “/usr/lib/python2.7/subprocess.py”, line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘/home/administrator/frappe-bench/env/bin/frappe --latest all’ returned non-zero exit status 1
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/administrator/bench-repo/bench/cli.py”, line 38, in cli
return bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/administrator/bench-repo/bench/cli.py”, line 210, in _migrate_to_v5
migrate_to_v5(bench=bench)
File “/home/administrator/bench-repo/bench/migrate_to_v5.py”, line 16, in migrate_to_v5
exec_cmd("{bench} update".format(bench=sys.argv[0]))
File “/home/administrator/bench-repo/bench/utils.py”, line 61, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File “/usr/lib/python2.7/subprocess.py”, line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘/usr/local/bin/bench update’ returned non-zero exit status 1

Any advice?

Thanks!

Hi, we had the same problem, here is the original post but still is unsolved maybe an admin can merge both posts:

https://discuss.frappe.io/t/error-migrating-v4-to-v5/4442