Upgrading from v6 to v7: DocType Salary Component Account not found

Hi,

trying to upgrade a live site and i get this error.

Executing erpnext.patches.v7_1.update_missing_salary_component_type in site1.local (1bd3e0294d)
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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 209, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 30, in migrate
frappe.modules.patch_handler.run_all()
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v7_1/update_missing_salary_component_type.py”, line 46, in execute
component.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 233, in save
return self.save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 261, in save
self.validate_higher_perm_levels()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 439, in validate_higher_perm_levels
high_permlevel_fields = frappe.get_meta(df.options).meta.get_high_permlevel_fields()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 606, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 30, in get_meta
return frappe.cache().hget(“meta”, doctype, lambda: Meta(doctype))
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 164, in hget
value = generator()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 30, in
return frappe.cache().hget(“meta”, doctype, lambda: Meta(doctype))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 62, in init
super(Meta, self).init(“DocType”, doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 80, in init
self.load_from_db()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 67, in load_from_db
super(Meta, self).load_from_db()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 111, in load_from_db
frappe.throw(
(“{0} {1} not found”).format(
(self.doctype), self.name), frappe.DoesNotExistError)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 300, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 293, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 266, in _raise_exception
raise raise_exception, encode(msg)
frappe.exceptions.DoesNotExistError: DocType Salary Component Account not found

Try bench retry-upgrade

exact same error occurs

Sorry about that. Hotfix for this issue will be released sometime today evening, please can you try upgrading after that.
https://github.com/frappe/erpnext/commit/7fc05d643268a368ba32d2948a1b03705aa756fb

thanks! that does the job