$bench switch-to-master --upgrade
Updating frappe : [========================================]
Updating erpnext : [========================================]
Migrating ikhlaskk
Executing frappe.patches.v6_9.int_float_not_null in ikhlaskk (f13bed8599)
Success
Executing frappe.patches.v6_9.rename_burmese_language in ikhlaskk (f13bed8599)
Success
Executing erpnext.patches.v6_3.convert_applicable_territory in ikhlaskk (f13bed8599)
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
“main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/ikhlas/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/ikhlas/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/ikhlas/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 700, in call
return self.main(*args, **kwargs)
File “/home/ikhlas/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 680, in main
rv = self.invoke(ctx)
File “/home/ikhlas/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ikhlas/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ikhlas/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/ikhlas/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 508, in invoke
return callback(*args, **kwargs)
File “/home/ikhlas/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 16, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/ikhlas/erpnext/frappe-bench/apps/frappe/frappe/commands.py”, line 29, in func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/ikhlas/erpnext/frappe-bench/apps/frappe/frappe/commands.py”, line 213, in migrate
frappe.modules.patch_handler.run_all()
File “/home/ikhlas/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/ikhlas/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/ikhlas/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/ikhlas/erpnext/frappe-bench/apps/erpnext/erpnext/patches/v6_3/convert_applicable_territory.py”, line 8, in execute
frappe.reload_doctype(“Shopping Cart Settings”)
File “/home/ikhlas/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 562, in reload_doctype
reload_doc(scrub(db.get_value(“DocType”, doctype, “module”)), “doctype”, scrub(doctype), force=force)
File “/home/ikhlas/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 587, in scrub
return txt.replace(’ ‘,’‘).replace(’-', '‘).lower()
AttributeError: ‘NoneType’ object has no attribute ‘replace’
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.92’, ‘console_scripts’, ‘bench’)()
File “/home/ikhlas/sajid/bench-repo/bench/cli.py”, line 60, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 700, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 680, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 508, in invoke
return callback(*args, **kwargs)
File “/home/ikhlas/sajid/bench-repo/bench/cli.py”, line 321, in _switch_to_master
switch_to_master(upgrade=upgrade)
File “/home/ikhlas/sajid/bench-repo/bench/app.py”, line 177, in switch_to_master
switch_branch(‘master’, apps=apps, bench=bench, upgrade=upgrade)
File “/home/ikhlas/sajid/bench-repo/bench/app.py”, line 172, in switch_branch
patch_sites()
File “/home/ikhlas/sajid/bench-repo/bench/utils.py”, line 158, in patch_sites
run_frappe_cmd(’–site’, ‘all’, ‘migrate’, bench=bench)
File “/home/ikhlas/sajid/bench-repo/bench/utils.py”, line 489, in run_frappe_cmd
raise CommandFailedError(args)
bench.utils.CommandFailedError: (‘–site’, ‘all’, ‘migrate’)
Try this,
bench switch-to-v4
bench switch-to-v5 --upgrade
bench switch-to-master --upgrade
@yashodhan If you run the setup_frappe.sh as a non root user with sudo, the script uses the same user account and doesn’t make a frappe user.
1 Like