I am stuck. Can't upgrade to v8, and can't go back. This production server, so please help urgently

Dear team,

While upgrading I was faced with a few errors. now the situation is like this"

frappe@work:~/frappe-bench/apps/frappe$ bench switch-to-master
Switching for frappe
INFO:bench.utils:git config --unset-all remote.upstream.fetch
INFO:bench.utils:git config --add remote.upstream.fetch '+refs/heads/*:refs/remotes/upstream/*'
INFO:bench.utils:git fetch upstream
INFO:bench.utils:git checkout master
Already on 'master'
Your branch is up-to-date with 'upstream/master'.
INFO:bench.utils:git merge upstream/master
Already up-to-date.
Switching for erpnext
INFO:bench.utils:git config --unset-all remote.upstream.fetch
INFO:bench.utils:git config --add remote.upstream.fetch '+refs/heads/*:refs/remotes/upstream/*'
INFO:bench.utils:git fetch upstream
INFO:bench.utils:git checkout master
Already on 'master'
Your branch is up-to-date with 'upstream/master'.
INFO:bench.utils:git merge upstream/master
Already up-to-date.
Successfully switched branches for:
frappe
erpnext

Switched to master
Please run `bench update --patch` to be safe from any differences in database schema
frappe@work:~/frappe-bench/apps/frappe$ bench update --patch
Backing up sites...
Patching sites...
Migrating site1.local
Executing frappe.patches.v8_0.update_published_in_global_search 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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    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 664, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/home/frappe/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/frappe/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/frappe/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/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 464, in invoke
    return callback(*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/patches/v8_0/update_published_in_global_search.py", line 6, in execute
    rebuild_for_doctype(doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/global_search.py", line 97, in rebuild_for_doctype
    update_global_search(frappe.get_doc(doctype, d.name))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 606, in get_doc
    return frappe.model.document.get_doc(arg1, arg2)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 51, in get_doc
    return controller(arg1, arg2)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/website_generator.py", line 16, in __init__
    super(WebsiteGenerator, self).__init__(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 84, in __init__
    self.load_from_db()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 115, in load_from_db
    frappe.throw(_("{0} {1} not found").format(_(self.doctype), self.name), frappe.DoesNotExistError)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 316, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 306, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 279, in _raise_exception
    raise raise_exception, encode(msg)
frappe.exceptions.DoesNotExistError: Item Item not found
frappe@work:~/frappe-bench/apps/frappe$

I need help urgently please otherwise my company will not be able to operate!

Regards,
Ahmed (NEST)

Try and run bench update --patch from here:

frappe@work:~/frappe-bench$

instead of:

frappe@work:~/frappe-bench/apps/frappe$

Thanks for response. I tried what you said, but it didn’t change the situation.

What is the traceback/message you are getting now?

It’s the same traceback:

frappe@work:~/frappe-bench$ bench update --patch
Backing up sites...
Patching sites...
Migrating site1.local
Executing frappe.patches.v8_0.update_published_in_global_search 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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    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 664, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/home/frappe/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/frappe/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/frappe/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/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 464, in invoke
    return callback(*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/patches/v8_0/update_published_in_global_search.py", line 6, in execute
    rebuild_for_doctype(doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/global_search.py", line 97, in rebuild_for_doctype
    update_global_search(frappe.get_doc(doctype, d.name))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 606, in get_doc
    return frappe.model.document.get_doc(arg1, arg2)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 51, in get_doc
    return controller(arg1, arg2)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/website_generator.py", line 16, in __init__
    super(WebsiteGenerator, self).__init__(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 84, in __init__
    self.load_from_db()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 115, in load_from_db
    frappe.throw(_("{0} {1} not found").format(_(self.doctype), self.name), frappe.DoesNotExistError)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 316, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 306, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 279, in _raise_exception
    raise raise_exception, encode(msg)
frappe.exceptions.DoesNotExistError: Item Item not found

What version are you upgrading from? and do you have any custom apps installed or made any modifications to core?

From version 7.

Best Regards,
Ahmed Samir
General Manager - Acting
NEST
M: +971 56 355 3539

Please do the following and paste the results

1. change to apps/frappe and do 'git status' 2. then change to apps/erpnext and repeat 'git status'

Paste the results here for both

Basically, you should be getting a message saying that its up to date with the master if you don’t you will need to update them manually then run bench update again.

Hi @saidsl,

git status was giving good results (i guess). Here it is:

frappe@work:~/frappe-bench/apps/frappe$ git status
On branch master
Your branch is up-to-date with 'upstream/master'.

nothing to commit, working directory clean
frappe@work:~/frappe-bench/apps/frappe$ cd ..
frappe@work:~/frappe-bench/apps$ cd erpnext
frappe@work:~/frappe-bench/apps/erpnext$ git status
On branch master
Your branch is up-to-date with 'upstream/master'.

nothing to commit, working directory clean
frappe@work:~/frappe-bench/apps/erpnext$

Hello @ahmed,

Show the output of

cd ~/frappe-bench && bench version

Hello Elliot,

It’s ver8 it seems! please see below:

frappe@work:~$ cd frappe-bench
frappe@work:~/frappe-bench$ bench version
erpnext 8.0.7
frappe 8.0.6
ui_customization 0.0.1
frappe@work:~/frappe-bench$

Best regards,
Ahmed Samir
General Manager - Acting
NEST
M: +971 56 355 3539

@ahmed

I am guessing there’s an incompatibility with ui_customization 0.0.1. Try and uninstall it then run the bench update --patch.

You can uninstall using bench uninstall-app ui_customization. It will not remove the app from the instance, you can try to install it again later after you’ve updated. But If it is incompatible, best avoid it for now

@saidsl

I think you may be correct because I got an error again while installing this custom app. This app is not important actually, and it was just me learning how to make an app ir ERPnext. Please see the error below:

frappe@work:~/frappe-bench/apps$ ls
erpnext  frappe  ui_customization
frappe@work:~/frappe-bench/apps$ bench uninstall-app ui_customization
All doctypes (including custom), modules related to this app will be deleted. Are you sure you want to continue (y/n) ? y
Backing up...
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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    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 664, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/home/frappe/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/frappe/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/frappe/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/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 464, in invoke
    return callback(*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 316, in uninstall
    remove_app(app, dry_run, yes)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 188, in remove_app
    fields=["name", "issingle"]):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1112, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 83, in execute
    result = self.build_and_run()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 95, in build_and_run
    args = self.prepare_args()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 113, in prepare_args
    self.build_conditions()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 248, in build_conditions
    match_conditions = self.build_match_conditions()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 360, in build_match_conditions
    role_permissions = frappe.permissions.get_role_permissions(meta, user=self.user)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/permissions.py", line 185, in get_role_permissions
    roles = frappe.get_roles(user)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 363, in get_roles
    return frappe.permissions.get_roles(username)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/permissions.py", line 351, in get_roles
    roles = frappe.cache().hget("roles", user, get)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 171, in hget
    value = generator()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/permissions.py", line 349, in get
    where parent=%s and role not in ('All', 'Guest')""", (user,))] + ['All', 'Guest']
  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.ProgrammingError: (1146, "Table '1bd3e0294d.tabHas Role' doesn't exist")
frappe@work:~/frappe-bench/apps$

So you are saying that you managed to get the update completed/working, but got an error when you tried to reinstall the app?

If I may suggest, since this is a production server, its best you setup a test installation for any testing, learning & development stuff also allows you to run updates and check for any pitfalls before doing anything on the production server.

No @saidsl , I was not able to uninstall the app. When i am uninstalling the app I get the error message in my last post. I want to get rid of this app now but I am not able to.

Try and use the bench remove-from-installed-apps ui_customization

Again makes an error :frowning: and doesn’t remove the app.

frappe@work:~/frappe-bench/apps$ bench remove-from-installed-apps ui_customization
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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    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 664, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/home/frappe/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/frappe/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/frappe/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/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 464, in invoke
    return callback(*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 300, in remove_from_installed_apps
    remove_from_installed_apps(app)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 166, in remove_from_installed_apps
    frappe.db.set_global("installed_apps", json.dumps(installed_apps))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 688, in set_global
    self.set_default(key, val, user)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 696, in set_default
    frappe.defaults.set_default(key, val, parent, parenttype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py", line 112, in set_default
    add_default(key, value, parent)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py", line 123, in add_default
    d.insert(ignore_permissions=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 187, in insert
    self.run_method("before_insert")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 669, in run_method
    self.run_email_alerts(method)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 690, in run_email_alerts
    filters={'enabled': 1, 'document_type': self.doctype})
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1139, in get_all
    return get_list(doctype, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1112, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 83, in execute
    result = self.build_and_run()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 95, in build_and_run
    args = self.prepare_args()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 113, in prepare_args
    self.build_conditions()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 243, in build_conditions
    self.build_filter_conditions(self.filters, self.conditions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 261, in build_filter_conditions
    conditions.append(self.prepare_filter_condition(f))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 269, in prepare_filter_condition
    f = get_filter(self.doctype, f)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/data.py", line 724, in get_filter
    meta = frappe.get_meta(f.doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 623, in get_meta
    return frappe.model.meta.get_meta(doctype, cached=cached)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 30, in get_meta
    return frappe.cache().hget("meta", doctype, lambda: Meta(doctype))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 171, in hget
    value = generator()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 30, in <lambda>
    return frappe.cache().hget("meta", doctype, lambda: Meta(doctype))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 66, in __init__
    self.process()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 226, in process
    self.set_custom_permissions()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 313, in set_custom_permissions
    filters=dict(parent=self.name), update=dict(doctype='Custom DocPerm'))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1139, in get_all
    return get_list(doctype, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1112, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 83, in execute
    result = self.build_and_run()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 95, in build_and_run
    args = self.prepare_args()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 112, in prepare_args
    self.set_optional_columns()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 212, in set_optional_columns
    columns = frappe.db.get_table_columns(self.doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 808, in get_table_columns
    return self.get_db_table_columns('tab' + doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 804, in get_db_table_columns
    return [r[0] for r in self.sql("DESC `%s`" % table)]
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 149, in sql
    self._cursor.execute(query)
  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.ProgrammingError: (1146, "Table '1bd3e0294d.tabCustom DocPerm' doesn't exist")
frappe@work:~/frappe-bench/apps$

Here’s a quick fix:
Open file named update_published_in_global_search.py in your apps/frappe/frappe/patches/v8_0 folder and modify it to look like this:

def execute():
	from frappe.website.router import get_doctypes_with_web_view
	from frappe.utils.global_search import rebuild_for_doctype

	for doctype in get_doctypes_with_web_view():
		try:
			rebuild_for_doctype(doctype)
		except Exception as e:
			pass

Then, run the command bench update --patch

edit: link to original patch for reference

2 Likes

@netchampfaris

OK, this really helped!

Now, I have passed through the upgrade process. but the login page is not giving me the place where I used to type password and username. It’s not going to Desk, and only to the website page.

Try to empty the cache of the browser, this happened to me too

Regards