Error in bench update --upgrade command

Hi, I received this error when I try to run the ‘bench update --upgrade’ command. I’m on V4 Master Branch. Please help?

’ From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch master → FETCH_HEAD
    Already up-to-date.
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → FETCH_HEAD
    Already up-to-date.
    Migrating erp.agtech.com.sg
    Executing erpnext.patches.v4_2.party_model in erp.agtech.com.sg (f7dccb995c)
    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/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 77, in
    main()
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 14, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 664, in call
    return self.main(*args, **kwargs)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 644, in main
    rv = self.invoke(ctx)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 464, in invoke
    return callback(*args, **kwargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands.py”, line 28, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands.py”, line 205, in migrate
    frappe.modules.patch_handler.run_all()
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
    if not run_single(patchmodule = patch):
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + “.execute”)()
    File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/patches/v4_2/party_model.py”, line 15, in execute
    delete_individual_party_account()
    File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/patches/v4_2/party_model.py”, line 102, in delete_individual_party_account
    and not exists(select gle.name from tabGL Entry gle where gle.account = acc.name)“”")
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/database.py”, line 146, in sql
    self._cursor.execute(query)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
    self.errorhandler(self, exc, value)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
    raise errorclass, errorvalue
    _mysql_exceptions.ProgrammingError: (1064, “You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘acc \n\t\twhere ifnull(acc.master_type, ‘’) in (‘Customer’, ‘Supplier’)\n\t\tand ifnul’ at line 1”)
    ubuntu@ip-172-31-27-142:~/frappe-bench$’

Just released a fix,
Please
bench retry-upgrade

Hi There, i am still encountering issues, but with different errors this time,

/home/ubuntu/frappe-bench/env/bin/python: No module named num2words
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/ubuntu/bench-repo/bench/cli.py”, line 56, in cli
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/ubuntu/bench-repo/bench/cli.py”, line 239, in update
pre_upgrade(version_upgrade[0], version_upgrade[1])
File “/home/ubuntu/bench-repo/bench/utils.py”, line 442, in pre_upgrade
remove_shopping_cart(bench=bench)
File “/home/ubuntu/bench-repo/bench/migrate_to_v5.py”, line 24, in remove_shopping_cart
run_frappe_cmd(‘–site’, ‘all’, ‘remove-from-installed-apps’, ‘shopping_cart’, bench=bench)
File “/home/ubuntu/bench-repo/bench/utils.py”, line 434, in run_frappe_cmd
subprocess.check_call((f, ‘-m’, ‘frappe.utils.bench_helper’, ‘frappe’) + args, cwd=sites_dir)
File “/usr/lib/python2.7/subprocess.py”, line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘(’/home/ubuntu/frappe-bench/env/bin/python’, ‘-m’, ‘frappe.utils.bench_helper’, ‘frappe’, ‘–site’, ‘all’, ‘remove-from-installed-apps’, ‘shopping_cart’)’ returned non-zero exit status 1