Error on update "Account group"

Hello,

I see others are having errors on update just now with duplicate products.

Main is a little different, as it complains from a missing parent account on all wharehouses.

The problem is that now, as the update failed, I can’t access ERPNext, as it displays with an error we will come back soon, and I can not do as the update process is telling me to do.

Many thanks for possible solutions and kind regards as ever from Spain,

pd. This is error message I get

Executing erpnext.patches.v7_0.create_warehouse_nestedset 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/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
        main()
      File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
        click.Group(commands=commands)(prog_name='bench')
      File "/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
        return self.main(*args, **kwargs)
      File "/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 696, in main
        rv = self.invoke(ctx)
      File "/home/erpnext/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/erpnext/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/erpnext/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/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
        return callback(*args, **kwargs)
      File "/home/erpnext/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/erpnext/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
        ret = f(frappe._dict(ctx.obj), *args, **kwargs)
      File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/site.py", line 166, in migrate
        migrate(context.verbose, rebuild_website=rebuild_website)
      File "/home/erpnext/frappe-bench/apps/frappe/frappe/migrate.py", line 27, in migrate
        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/v7_0/create_warehouse_nestedset.py", line 9, in execute
        create_default_warehouse_group(company)
      File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/patches/v7_0/create_warehouse_nestedset.py", line 48, in create_default_warehouse_group
        }).insert(ignore_permissions=True)
      File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 213, in insert
        self.run_post_save_methods()
      File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 660, in run_post_save_methods
        self.run_method("on_update")
      File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 603, in run_method
        return Document.hook(fn)(self, *args, **kwargs)
      File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 768, in composer
        return composed(self, method, *args, **kwargs)
      File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 751, in runner
        add_to_return_value(self, fn(self, *args, **kwargs))
      File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 597, in <lambda>
        fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
      File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/stock/doctype/warehouse/warehouse.py", line 48, in on_update
        self.create_account_head()
      File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/stock/doctype/warehouse/warehouse.py", line 57, in create_account_head
        self.validate_parent_account()
      File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/stock/doctype/warehouse/warehouse.py", line 93, in validate_parent_account
        frappe.throw(_("Please enter parent account group for warehouse {0}").format(self.name))
      File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 299, in throw
        msgprint(msg, raise_exception=exc, title=title)
      File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 292, in msgprint
        _raise_exception()
      File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 265, in _raise_exception
        raise raise_exception, encode(msg)
    frappe.exceptions.ValidationError: Please enter parent account group for warehouse All Warehouses - ATEST
    Traceback (most recent call last):
      File "/usr/local/bin/bench", line 9, in <module>
        load_entry_point('bench==0.1', 'console_scripts', 'bench')()
      File "/home/erpnext/bench-repo/bench/cli.py", line 40, in cli
        bench_command()
      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/erpnext/bench-repo/bench/commands/update.py", line 60, in update
        _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
      File "/home/erpnext/bench-repo/bench/commands/update.py", line 90, in _update
        patch_sites(bench_path=bench_path)
      File "/home/erpnext/bench-repo/bench/utils.py", line 134, in patch_sites
        run_frappe_cmd('--site', 'all', 'migrate', bench_path=bench_path)
      File "/home/erpnext/bench-repo/bench/utils.py", line 499, in run_frappe_cmd
        raise CommandFailedError(args)
    bench.utils.CommandFailedError: ('--site', 'all', 'migrate')

@saurabh6790 can you check?

Hi rmehta,

Many thanks for your reply!

I am afraid it is still the same.

Thanks and Kind regards from Spain,

Alberto

Hi,

I have just seen you solved the wharehouse issue, but now there is another small issue. This is what I get:

Executing erpnext.patches.v7_0.convert_timelogbatch_to_timesheet 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/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/erpnext/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/erpnext/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/erpnext/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/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/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/erpnext/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/site.py", line 166, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/migrate.py", line 27, in migrate
    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/v7_0/convert_timelogbatch_to_timesheet.py", line 12, in execute
    for data in tlb.time_logs:
TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/erpnext/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  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/erpnext/bench-repo/bench/commands/update.py", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/erpnext/bench-repo/bench/commands/update.py", line 90, in _update
    patch_sites(bench_path=bench_path)
  File "/home/erpnext/bench-repo/bench/utils.py", line 134, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench_path=bench_path)
  File "/home/erpnext/bench-repo/bench/utils.py", line 499, in run_frappe_cmd
    raise CommandFailedError(args)
bench.utils.CommandFailedError: ('--site', 'all', 'migrate')

Nearly there. Many thanks and kind regards from Spain,

Alb

Hi,

It is solved on the last update. Many thanks!!

Kind regards,

Alberto

Just running upgrade from v6 to v7 and got this

frappe.exceptions.MandatoryError: [Warehouse, All Warehouses - IMP]: cost_center
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.92', 'console_scripts', 'bench')()
  File "/home/vef1/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/vef1/bench-repo/bench/commands/update.py", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/vef1/bench-repo/bench/commands/update.py", line 90, in _update
    patch_sites(bench_path=bench_path)
  File "/home/vef1/bench-repo/bench/utils.py", line 161, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench_path=bench_path)
  File "/home/vef1/bench-repo/bench/utils.py", line 501, in run_frappe_cmd
    raise CommandFailedError(args)
bench.utils.CommandFailedError: ('--site', 'all', 'migrate')