Error while update

Hello Guys,

Please help me, I am facing the following error while updating using “bench update” or “bench update --reset”

My current version is:
ERPNext: v8.6.5 (master)
Frappe Framework: v8.6.4 (master)

Following is the error:

INFO:bench.utils:updating bench
INFO:bench.utils:git pull
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 12 (delta 10), reused 6 (delta 4), pack-reused 0
Unpacking objects: 100% (12/12), done.
From github.com/frappe/bench
c9c75bd…6b50f4c master -> origin/master
Auto-merging .travis.yml
Merge made by the ‘recursive’ strategy.
.travis.yml | 2 ++
README.md | 1 +
bench/commands/make.py | 8 +++±—
bench/utils.py | 34 +++++++++++++++++++++±-----------
playbooks/install.py | 38 +++++++++++++++++++++++++++++++±-----
5 files changed, 61 insertions(+), 22 deletions(-)
remote: Counting objects: 1568, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 1568 (delta 927), reused 937 (delta 922), pack-reused 626
Receiving objects: 100% (1568/1568), 316.03 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1280/1280), completed with 348 local objects.
From github.com/frappe/frappe
0e92ffc…67e13e4 master -> upstream/master
465d6b3…4b730e0 develop -> upstream/develop
0e92ffc…6e33a8c hotfix -> upstream/hotfix

  • [new branch] revert-3886-test-lib -> upstream/revert-3886-test-lib
    ecaf4f6…15e31ca staging -> upstream/staging
  • [new tag] v8.7.3 -> v8.7.3
  • [new tag] v8.6.5 -> v8.6.5
  • [new tag] v8.6.6 -> v8.6.6
  • [new tag] v8.6.7 -> v8.6.7
  • [new tag] v8.6.8 -> v8.6.8
  • [new tag] v8.7.0 -> v8.7.0
  • [new tag] v8.7.1 -> v8.7.1
  • [new tag] v8.7.2 -> v8.7.2
    INFO:bench.utils:./env/bin/pip install Pillow
    Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
    Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
    INFO:bench.app:pulling frappe
    INFO:bench.utils:git fetch --all
    Fetching upstream
    INFO:bench.utils:git reset --hard upstream/master
    HEAD is now at 67e13e4 Merge branch ‘hotfix’
    INFO:bench.utils:find . -name “*.pyc” -delete
    INFO:bench.app:pulling erpnext
    INFO:bench.utils:git fetch --all
    Fetching upstream
    remote: Counting objects: 2968, done.
    remote: Compressing objects: 100% (1465/1465), done.
    remote: Total 2968 (delta 1821), reused 2424 (delta 1487), pack-reused 0
    Receiving objects: 100% (2968/2968), 1.45 MiB | 0 bytes/s, done.
    Resolving deltas: 100% (1821/1821), completed with 680 local objects.
    From github.com/frappe/erpnext
    4d185f3…353956a master -> upstream/master
  • [new tag] 4.0.0 -> 4.0.0
  • [new tag] v8.8.0 -> v8.8.0
    INFO:bench.utils:git reset --hard upstream/master
    HEAD is now at 353956a Merge branch ‘hotfix’
    INFO:bench.utils:find . -name “*.pyc” -delete
    Updating Python libraries…
    INFO:bench.utils:./env/bin/pip install --upgrade pip
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/.bench/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    Updating node libraries…
    INFO:bench.utils:npm install
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
    npm WARN frappe@ No description
    Backing up sites…
    Patching sites…
    Migrating site1.local
    Executing frappe.patches.v8_5.delete_email_group_member_with_invalid_emails in site1.local (1bd3e0294da19198)
    Success
    Executing frappe.patches.v8_x.update_user_permission in site1.local (1bd3e0294da19198)
    Traceback (most recent call last):
    File “/usr/lib/python2.7/runpy.py”, line 174, 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 94, in
    main()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, 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 722, in call
    return self.main(*args, **kwargs)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
    rv = self.invoke(ctx)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, 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 1066, 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 895, 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 535, 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 217, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 31, 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/frappe/frappe/patches/v8_x/update_user_permission.py”, line 25, in execute
    )).insert(ignore_permissions = True)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 193, in insert
    self._validate()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 400, in _validate
    self._validate_links()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 625, in validate_links
    invalid_links, cancelled_links = self.get_invalid_links()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 469, in get_invalid_links
    frappe.throw(
    ("{0} must be set first").format(self.meta.get_label(df.options)))
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 319, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 309, in msgprint
    _raise_exception()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
    raise raise_exception(encode(msg))
    frappe.exceptions.ValidationError: Allow must be set first

Appreciate your help

Can you add this on GitHub as an issue? https://github.com/frappe/erpnext/issues

Issue has been added under # 10389

Thanks a lot.

I came across the same error when running bench update. Any solution yet??