tabPatch Log' doesn't exist

hi…
sunrise@sunrise:~/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 GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch develop → FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling erpnext
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch develop → FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling erpnext_shopify
    From GitHub - frappe/erpnext_shopify: [Deprecated] Shopify connector for ERPNext
  • branch master → FETCH_HEAD
    Already up-to-date.
    /home/sunrise/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
    SNIMissingWarning
    /home/sunrise/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
    InsecurePlatformWarning
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    Migrating sun
    Updating frappe : [========================================]
    Migrating demo
    Updating frappe : [========================================]
    Updating erpnext : [========================================]
    Migrating store
    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/sunrise/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
    main()
    File “/home/sunrise/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/sunrise/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
    return self.main(*args, **kwargs)
    File “/home/sunrise/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
    rv = self.invoke(ctx)
    File “/home/sunrise/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 “/home/sunrise/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 “/home/sunrise/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/sunrise/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
    return callback(*args, **kwargs)
    File “/home/sunrise/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/sunrise/frappe-bench/apps/frappe/frappe/commands.py”, line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/home/sunrise/frappe-bench/apps/frappe/frappe/commands.py”, line 220, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/home/sunrise/frappe-bench/apps/frappe/frappe/migrate.py”, line 27, in migrate
    frappe.modules.patch_handler.run_all()
    File “/home/sunrise/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 21, in run_all
    executed = [p[0] for p in frappe.db.sql(“”“select patch from tabPatch Log”“”)]
    File “/home/sunrise/frappe-bench/apps/frappe/frappe/database.py”, line 147, in sql
    self._cursor.execute(query)
    File “/home/sunrise/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
    self.errorhandler(self, exc, value)
    File “/home/sunrise/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
    raise errorclass, errorvalue
    _mysql_exceptions.ProgrammingError: (1146, “Table ‘3a21295d81.tabPatch Log’ doesn’t exist”)
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 9, in
    load_entry_point(‘bench==2.1.0’, ‘console_scripts’, ‘bench’)()
    File “/home/sunrise/bench-repo/bench/cli.py”, line 40, in cli
    bench_command()
    File “/usr/local/lib/python2.7/dist-packages/click-6.4-py2.7.egg/click/core.py”, line 716, in call
    return self.main(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/click-6.4-py2.7.egg/click/core.py”, line 696, in main
    rv = self.invoke(ctx)
    File “/usr/local/lib/python2.7/dist-packages/click-6.4-py2.7.egg/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-6.4-py2.7.egg/click/core.py”, line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/local/lib/python2.7/dist-packages/click-6.4-py2.7.egg/click/core.py”, line 534, in invoke
    return callback(*args, **kwargs)
    File “/home/sunrise/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 “/home/sunrise/bench-repo/bench/commands/update.py”, line 90, in _update
    patch_sites(bench=bench_path)
    File “/home/sunrise/bench-repo/bench/utils.py”, line 131, in patch_sites
    run_frappe_cmd(‘–site’, ‘all’, ‘migrate’, bench=bench)
    File “/home/sunrise/bench-repo/bench/utils.py”, line 454, in run_frappe_cmd
    raise CommandFailedError(args)
    bench.utils.CommandFailedError: (‘–site’, ‘all’, ‘migrate’)

Yes, I encountered the same. This is a bit worrying, because it affects existing installations with lots of data. I feel this error may be related to another one I just filed, and which seems to creep back into the picture without any workaround: Unable to to perform upgrade of ERPNext - New Installation Stuck at bench new-site Command
Any ideas?

ikhlas@ikhlas:~/frappe-bench$ bench update
remote: Counting objects: 56, done.
remote: Total 56 (delta 50), reused 50 (delta 50), pack-reused 5
Unpacking objects: 100% (56/56), done.
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript
0b26523…9c7d1f2 develop → upstream/develop
54f9632…f85f2f5 hotfix → upstream/hotfix
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 GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling erpnext
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling schools
    remote: Counting objects: 15, done.
    remote: Compressing objects: 100% (15/15), done.
    remote: Total 15 (delta 4), reused 0 (delta 0), pack-reused 0
    Unpacking objects: 100% (15/15), done.
    From GitHub - frappe/schools: Merged with frappe/erpnext - this repo is deprecated
  • branch develop → FETCH_HEAD
    Updating 1967627…b4d67b8
    Fast-forward
    …/doctype/student_applicant/student_applicant.js | 13 +++++
    …/student_applicant/student_applicant.json | 59 +++++++++++++±-----
    2 files changed, 54 insertions(+), 18 deletions(-)
    INFO:bench.app:pulling s3_backup
    From GitHub - ccfiel/s3_backup: Repo is transfer to our Bai Web and Mobile Labs. The new repo site https://github.com/bailabs/s3_backup
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling mandrill_integration
    From GitHub - frappe/mandrill_integration: Set Communication status from Mandrill via webhooks
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling paypal_integration
    From GitHub - frappe/paypal_integration: Paypal API Integrations
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling erpnext_shopify
    From GitHub - frappe/erpnext_shopify: [Deprecated] Shopify connector for ERPNext
  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling civil_contracting
    From GitHub - revant/civil_contracting: Frappe App for use in Civil Contracting Business
  • branch master → FETCH_HEAD
    Already up-to-date.
    /home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
    SNIMissingWarning
    /home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
    InsecurePlatformWarning
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    Migrating civil
    Updating frappe : [========================================]
    Updating civil_contracting : [========================================]
    Migrating erp
    Updating frappe : [========================================]
    Migrating sunerp
    Executing frappe.patches.v5_0.style_settings_to_website_theme in sunerp (8f16163e62)
    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/ikhlas/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
    main()
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 716, in call
    return self.main(*args, **kwargs)
    File “/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 696, in main
    rv = self.invoke(ctx)
    File “/home/ikhlas/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 “/home/ikhlas/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 “/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
    return callback(*args, **kwargs)
    File “/home/ikhlas/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/ikhlas/frappe-bench/apps/frappe/frappe/commands.py”, line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/commands.py”, line 205, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/migrate.py”, line 27, in migrate
    frappe.modules.patch_handler.run_all()
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
    if not run_single(patchmodule = patch):
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + “.execute”)()
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/patches/v5_0/style_settings_to_website_theme.py”, line 10, in execute
    migrate_style_settings()
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/patches/v5_0/style_settings_to_website_theme.py”, line 28, in migrate_style_settings
    website_theme.use_theme()
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/website/doctype/website_theme/website_theme.py”, line 55, in use_theme
    use_theme(self.name)
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/website/doctype/website_theme/website_theme.py”, line 62, in use_theme
    website_settings.save()
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/model/document.py”, line 244, in save
    self.run_before_save_methods()
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/model/document.py”, line 617, in run_before_save_methods
    self.run_method(“validate”)
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/model/document.py”, line 579, in run_method
    return Document.hook(fn)(self, *args, **kwargs)
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/model/document.py”, line 735, in composer
    return composed(self, method, *args, **kwargs)
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/model/document.py”, line 718, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/model/document.py”, line 573, in
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/website/doctype/website_settings/website_settings.py”, line 17, in validate
    self.validate_home_page()
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/website/doctype/website_settings/website_settings.py”, line 22, in validate_home_page
    if self.home_page and not resolve_route(self.home_page):
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/website/router.py”, line 46, in resolve_route
    return get_generator_route(path)
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/website/router.py”, line 57, in get_generator_route
    generator_routes = get_generator_routes()
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/website/router.py”, line 84, in get_generator_routes
    {2}“”".format(route_column_name, doctype, condition), as_dict=True):
    File “/home/ikhlas/frappe-bench/apps/frappe/frappe/database.py”, line 147, in sql
    self._cursor.execute(query)
    File “/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
    self.errorhandler(self, exc, value)
    File “/home/ikhlas/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 ‘page_name’ in ‘field list’”)
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 9, in
    load_entry_point(‘bench==2.0.0’, ‘console_scripts’, ‘bench’)()
    File “/home/ikhlas/bench-repo/bench/cli.py”, line 40, in cli
    bench_command()
    File “/usr/local/lib/python2.7/dist-packages/click-6.4-py2.7.egg/click/core.py”, line 716, in call
    return self.main(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/click-6.4-py2.7.egg/click/core.py”, line 696, in main
    rv = self.invoke(ctx)
    File “/usr/local/lib/python2.7/dist-packages/click-6.4-py2.7.egg/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-6.4-py2.7.egg/click/core.py”, line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/local/lib/python2.7/dist-packages/click-6.4-py2.7.egg/click/core.py”, line 534, in invoke
    return callback(*args, **kwargs)
    File “/home/ikhlas/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 “/home/ikhlas/bench-repo/bench/commands/update.py”, line 90, in _update
    patch_sites(bench=bench_path)
    File “/home/ikhlas/bench-repo/bench/utils.py”, line 131, in patch_sites
    run_frappe_cmd(‘–site’, ‘all’, ‘migrate’, bench=bench)
    File “/home/ikhlas/bench-repo/bench/utils.py”, line 454, in run_frappe_cmd
    raise CommandFailedError(args)
    bench.utils.CommandFailedError: (‘–site’, ‘all’, ‘migrate’)
    ikhlas@ikhlas:~/frappe-bench$