ERPNext bench update error

Hello,

I am trying to execute the "# bench update " under /frappe-bench folder, and got following error:
Could you please advise how to solve this error?

Thanks a lot.

bz

mksimple@lab9:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
Already up-to-date.
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages
INFO:bench.app:pulling frappe
From https://github.com/frappe/frappe
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
INFO:bench.app:pulling erpnext
From https://github.com/frappe/erpnext
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
Migrating trade.marketsimple.com
Executing frappe.patches.v7_0.set_user_fullname in trade.marketsimple.com (b41fb7345e)
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 "/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/var/service/www/nginx/marketsimple.com/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 "/var/service/www/nginx/marketsimple.com/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 "/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/var/service/www/nginx/marketsimple.com/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 "/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/commands.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/commands.py", line 218, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/migrate.py", line 27, in migrate
    frappe.modules.patch_handler.run_all()
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
    if not run_single(patchmodule = patch):
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/patches/v7_0/set_user_fullname.py", line 7, in execute
    user.db_set('full_name', user.full_name, update_modified = False)
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/model/base_document.py", line 351, in db_set
    self.modified, self.modified_by, update_modified=update_modified)
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/database.py", line 599, in set_value
    {2}""".format(dt, field, conditions), values, debug=debug)
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/database.py", line 136, in sql
    self._cursor.execute(query, values)
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1054, "Unknown column 'full_name' in 'field list'")
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/var/service/www/nginx/marketsimple.com/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 "/var/service/www/nginx/marketsimple.com/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 "/var/service/www/nginx/marketsimple.com/bench-repo/bench/commands/update.py", line 90, in _update
    patch_sites(bench=bench_path)
  File "/var/service/www/nginx/marketsimple.com/bench-repo/bench/utils.py", line 131, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench=bench)
  File "/var/service/www/nginx/marketsimple.com/bench-repo/bench/utils.py", line 450, in run_frappe_cmd
    raise CommandFailedError(args)
bench.utils.CommandFailedError: ('--site', 'all', 'migrate')
mksimple@lab9:~/frappe-bench$

This patch is failing.

Executing frappe.patches.v7_0.set_user_fullname in trade.marketsimple.com (b41fb7345e)
1 Like

@bzero, @kolate_sambhaji thanks for reporting. Now fixed.

1 Like

@kolate_sambhaji, @rmehta
Thank you all. The problem is fixed.

1 Like

Hi,

i am getting issue during executing #bench update, detail error as below:
Please show me how to fix it.

Thanks a lot.

From https://github.com/frappe/erpnext

  • branch develop -> FETCH_HEAD
    Already up-to-date.
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    Migrating trade.marketsimple.com
    Updating frappe : [============================= ]bad json: /var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.json
    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 “/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
    main()
    File “/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
    return self.main(*args, **kwargs)
    File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
    rv = self.invoke(ctx)
    File “/var/service/www/nginx/marketsimple.com/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 “/var/service/www/nginx/marketsimple.com/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 “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/var/service/www/nginx/marketsimple.com/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
    return callback(*args, **kwargs)
    File “/var/service/www/nginx/marketsimple.com/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 “/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/commands.py”, line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/commands.py”, line 218, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/migrate.py”, line 29, in migrate
    frappe.model.sync.sync_all(verbose=verbose)
    File “/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/model/sync.py”, line 19, in sync_all
    sync_for(app, force, verbose=verbose)
    File “/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/model/sync.py”, line 43, in sync_for
    import_file_by_path(doc_path, force=force)
    File “/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 36, in import_file_by_path
    docs = read_doc_from_file(path)
    File “/var/service/www/nginx/marketsimple.com/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 74, in read_doc_from_file
    doc = json.loads(f.read())
    File “/usr/lib/python2.7/json/init.py”, line 338, in loads
    return _default_decoder.decode(s)
    File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File “/usr/lib/python2.7/json/decoder.py”, line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
    ValueError: Expecting property name: line 496 column 1 (char 11359)
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 9, in
    load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
    File “/var/service/www/nginx/marketsimple.com/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 “/var/service/www/nginx/marketsimple.com/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 “/var/service/www/nginx/marketsimple.com/bench-repo/bench/commands/update.py”, line 90, in _update
    patch_sites(bench=bench_path)
    File “/var/service/www/nginx/marketsimple.com/bench-repo/bench/utils.py”, line 131, in patch_sites
    run_frappe_cmd(’–site’, ‘all’, ‘migrate’, bench=bench)
    File “/var/service/www/nginx/marketsimple.com/bench-repo/bench/utils.py”, line 450, in run_frappe_cmd
    raise CommandFailedError(args)
    bench.utils.CommandFailedError: (’–site’, ‘all’, ‘migrate’)

@bzero fixed. Can you update again?

1 Like

Thanks @anand
It works.