Bench update error on fresh new install

Dear all,

i got following error after executing #bench update on fresh install on new Ubuntu server.
`:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
Already up-to-date.
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
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 tss.marketsimple.com
    Executing frappe.patches.v7_3.rename_page_role_to_has_role in tss.marketsimple.com (4990a72a2f199a0f)
    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 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 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 210, 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 93, in execute_patch
    frappe.db.commit()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 727, in commit
    sync_global_search()
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/global_search.py”, line 71, in sync_global_search
    content = %(content)s’’’, value)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 138, in sql
    self._cursor.execute(query, values)
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
    self.errorhandler(self, exc, value)
    File “/home/frappe/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 ‘published’ in ‘field list’”)`

Thanks for reporting.

Pushed a fix. Check now.

thanks @rmehta for your fix.
Unfortunately, the error still exists during execute #bench update

`frappe@sky:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
Already up-to-date.
remote: Counting objects: 37, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 37 (delta 32), reused 34 (delta 29), pack-reused 0
Unpacking objects: 100% (37/37), done.
From https://github.com/frappe/frappe
3cc2a5e…28b38d4 develop -> upstream/develop
dcc170d…1652460 hotfix -> upstream/hotfix
f459919…1652460 master -> upstream/master

  • [new tag] v7.2.28 -> v7.2.28
    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
    From https://github.com/frappe/frappe
  • branch develop -> FETCH_HEAD
    Updating 3cc2a5e…28b38d4
    Fast-forward
    frappe/init.py | 5 ++±-
    frappe/email/receive.py | 29 +++++++++++++±--------------
    frappe/migrate.py | 2 ++
    frappe/modules/patch_handler.py | 2 ±
    frappe/patches.txt | 1 +
    frappe/patches/v6_4/reduce_varchar_length.py | 2 ++
    frappe/patches/v7_2/update_communications.py | 7 ++++±-
    frappe/patches/v8_0/update_published_in_global_search.py | 3 +±
    frappe/translate.py | 2 ±
    frappe/website/context.py | 3 +±
    frappe/website/doctype/web_form/web_form.js | 2 ±
    frappe/www/error.py | 1 +
    12 files changed, 35 insertions(+), 24 deletions(-)
    INFO:bench.app:pulling erpnext
    remote: Counting objects: 191063, done.
    remote: Compressing objects: 100% (44598/44598), done.
    remote: Total 191063 (delta 147142), reused 188625 (delta 144741), pack-reused 0
    Receiving objects: 100% (191063/191063), 167.49 MiB | 4.42 MiB/s, done.
    Resolving deltas: 100% (147142/147142), completed with 1658 local objects.
    From https://github.com/frappe/erpnext
  • branch develop -> FETCH_HEAD
    1af471a…33fb6ae develop -> upstream/develop
    Updating 1af471a…33fb6ae
    Fast-forward
    erpnext/init.py | 2 ±
    erpnext/accounts/doctype/journal_entry/journal_entry.py | 8 --------
    erpnext/accounts/report/financial_statements.py | 3 ±-
    3 files changed, 2 insertions(+), 11 deletions(-)
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    Migrating tss.marketsimple.com
    Executing frappe.patches.v8_0.update_global_search_table in tss.marketsimple.com (4990a72a2f199a0f)
    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 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 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 210, 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/init.py”, line 884, in get_attr
    return getattr(get_module(modulename), methodname)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 669, in get_module
    return importlib.import_module(modulename)
    File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
    import(name)
    ImportError: No module named update_global_search_table`

Sorry for that. Pushed a fix again.

1 Like

thanks @rmehta
it works now!