Failure Updating VM demo

I tried to update my local VM version ERPNext 2411114.
When I check the localhost:8080 I see this message “Updating. We will be back in a few moments…”

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/app.py”, line 58, in application
File “/home/erpnext/frappe-bench/apps/frappe/frappe/website/render.py”, line 47, in render
“Location”: frappe.flags.redirect_location,
File “/home/erpnext/frappe-bench/apps/frappe/frappe/website/render.py”, line 105, in render_page
File “/home/erpnext/frappe-bench/apps/frappe/frappe/website/render.py”, line 114, in build
return out
File “/home/erpnext/frappe-bench/apps/frappe/frappe/website/render.py”, line 124, in build_json
try:
File “/home/erpnext/frappe-bench/apps/frappe/frappe/website/context.py”, line 36, in get_context
add_data_path(context)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/website/context.py”, line 81, in build_context
File “/home/erpnext/frappe-bench/apps/frappe/frappe/website/template.py”, line 50, in render_blocks
new_context = template.new_context(context)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/jinja.py”, line 23, in get_template
return get_jenv().get_template(path)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 791, in get_template
return self._load_template(name, self.make_globals(globals))
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 765, in _load_template
template = self.loader.load(self, name, globals)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/loaders.py”, line 395, in load
return loader.load(environment, name, globals)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/loaders.py”, line 125, in load
code = environment.compile(source, name, filename)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 554, in compile
self.handle_exception(exc_info, source_hint=source)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/./templates/includes/breadcrumbs.html”, line 5, in

TemplateAssertionError: no filter named ‘with_leading_slash’

Did you get any errors while bench update?

Yes I had error at the end of update

Can you share the error trace (at the end of bench update??)

t-vm (erpnext)
Success
Executing execute:frappe.permissions.reset_perms(“User”) #2015-03-24 in erpnext. erpnext-vm (erpnext)
Success
Executing frappe.patches.v5_0.rename_table_fieldnames in erpnext.erpnext-vm (erp next)
Success
Executing frappe.patches.v5_0.communication_parent in erpnext.erpnext-vm (erpnex t)
Success
Executing frappe.patches.v5_0.clear_website_group_and_notifications in erpnext.e rpnext-vm (erpnext)
Success
Executing execute:frappe.db.sql(“”“update tabComment set comment = substr(commen t, 6, locate(”:“, comment)-6) where comment_type in (“Assigned”, “Assignment Com pleted”)”“”) in erpnext.erpnext-vm (erpnext)
Success
Executing frappe.patches.v5_0.fix_feed in erpnext.erpnext-vm (erpnext)
Success
Executing frappe.patches.v5_0.update_shared in erpnext.erpnext-vm (erpnext)
Success
Executing frappe.patches.v5_0.bookmarks_to_stars in erpnext.erpnext-vm (erpnext)
Success
Executing frappe.patches.v5_0.style_settings_to_website_theme in erpnext.erpnext -vm (erpnext)
Success
Executing frappe.patches.v5_0.rename_ref_type_fieldnames in erpnext.erpnext-vm ( erpnext)
Success
Executing frappe.patches.v5_0.fix_email_alert in erpnext.erpnext-vm (erpnext)
Success
Executing frappe.patches.v5_0.fix_null_date_datetime in erpnext.erpnext-vm (erpn ext)
Success
Executing frappe.patches.v5_0.force_sync_website in erpnext.erpnext-vm (erpnext)
Success
Executing execute:frappe.delete_doc(“DocType”, “Tag”) in erpnext.erpnext-vm (erp next)
Success
Executing execute:frappe.db.sql(“delete from tabProperty Setter where propert y in (‘idx’, ‘_idx’)”) in erpnext.erpnext-vm (erpnext)
Success
Executing frappe.patches.v5_0.move_scheduler_last_event_to_system_settings in er pnext.erpnext-vm (erpnext)
Success
Executing execute:frappe.db.sql(“update tabUser set new_password=‘’ where ifnull (new_password, ‘’)!=‘’”) in erpnext.erpnext-vm (erpnext)
Success
Executing frappe.patches.v5_0.fix_text_editor_file_urls in erpnext.erpnext-vm (e rpnext)
Success
Executing execute:frappe.db.sql(“update tabComment set comment_type=‘Comment’ where comment_doctype=‘Blog Post’ and ifnull(comment_type, ‘’)=‘’”) in erpnext.e rpnext-vm (erpnext)
Success
Executing execute:frappe.permissions.reset_perms(“GL Entry”) #2014-06-09 in erpn ext.erpnext-vm (erpnext)
Success
Executing execute:frappe.permissions.reset_perms(“Stock Ledger Entry”) #2014-06- 09 in erpnext.erpnext-vm (erpnext)
Success
Executing execute:frappe.rename_doc(“DocType”, “Support Ticket”, “Issue”, force= True) in erpnext.erpnext-vm (erpnext)
Success
Executing erpnext.patches.v4_4.make_email_accounts in erpnext.erpnext-vm (erpnex t)
Success
Executing execute:frappe.delete_doc(“DocType”, “Contact Control”) in erpnext.erp next-vm (erpnext)
Success
Executing erpnext.patches.v4_2.discount_amount in erpnext.erpnext-vm (erpnext)
Success
Executing erpnext.patches.v4_2.reset_bom_costs in erpnext.erpnext-vm (erpnext)
Success
Executing erpnext.patches.v5_0.update_frozen_accounts_permission_role in erpnext .erpnext-vm (erpnext)
Success
Executing erpnext.patches.v5_0.update_dn_against_doc_fields in erpnext.erpnext-v m (erpnext)
Success
Executing execute:frappe.db.sql(“update tabMaterial Request set material_reque st_type = ‘Material Transfer’ where material_request_type = ‘Transfer’”) in erpn ext.erpnext-vm (erpnext)
Success
Executing execute:frappe.reload_doc(‘stock’, ‘doctype’, ‘item’) in erpnext.erpne xt-vm (erpnext)
Success
Executing execute:frappe.db.sql(“update tabItem i set apply_warehouse_wise_reo rder_level=1, re_order_level=0, re_order_qty=0 where exists(select name from ta bItem Reorder where parent=i.name)”) in erpnext.erpnext-vm (erpnext)
Success
Executing erpnext.patches.v5_0.set_default_company_in_bom in erpnext.erpnext-vm (erpnext)
Success
Executing erpnext.patches.v5_0.capacity_planning in erpnext.erpnext-vm (erpnext)
Success
Executing execute:frappe.reload_doc(‘crm’, ‘doctype’, ‘lead’) in erpnext.erpnext -vm (erpnext)
Success
Executing execute:frappe.reload_doc(‘crm’, ‘doctype’, ‘opportunity’) in erpnext. erpnext-vm (erpnext)
Success
Executing erpnext.patches.v5_0.rename_table_fieldnames in erpnext.erpnext-vm (er pnext)
/home/erpnext/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_taxes_and _charges_master/sales_taxes_and_charges_master.json missing
/home/erpnext/frappe-bench/apps/frappe/frappe/core/doctype/purchase_taxes_and_ch arges_template/purchase_taxes_and_charges_template.json missing
rename_field: taxes not found in Sales Taxes and Charges Master
rename_field: territories not found in Sales Taxes and Charges Master
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/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, li ne 77, in
main()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, li ne 14, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/c ore.py”, line 664, in call
return self.main(*args, **kwargs)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/c ore.py”, line 644, in main
rv = self.invoke(ctx)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/c ore.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/c ore.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/c ore.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/c ore.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/commands.py”, line 28, in func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/commands.py”, line 205, in migrate
frappe.modules.patch_handler.run_all()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/patches/v5_0/rename_tabl e_fieldnames.py”, line 235, in execute
rename_field(dt, field[0], field[1])
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/init.py”, line 7 9, in rename_field
meta = frappe.get_meta(doctype, cached=False)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 506, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/meta.py”, line 20, i n get_meta
return Meta(doctype)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/meta.py”, line 49, i n init
super(Meta, self).init(“DocType”, doctype)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 7 6, in init
self.load_from_db()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/meta.py”, line 54, i n load_from_db
super(Meta, self).load_from_db()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 1 06, in load_from_db
frappe.throw(
(“{0} {1} not found”).format(
(self.doctype), self.name), frap pe.DoesNotExistError)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 250, in throw
msgprint(msg, raise_exception=exc)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 243, in msgprint
_raise_exception()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 228, in _raise_exception
raise raise_exception, encode(msg)
frappe.exceptions.DoesNotExistError: DocType Purchase Taxes and Charges Template not found
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/erpnext/bench-repo/bench/cli.py”, line 55, in cli
bench()
File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py ", line 610, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py ", line 590, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/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-3.3-py2.7.egg/click/core.py ", line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py ", line 416, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench-repo/bench/cli.py”, line 247, in update
patch_sites()
File “/home/erpnext/bench-repo/bench/utils.py”, line 118, in patch_sites
run_frappe_cmd(‘–site’, ‘all’, ‘migrate’, bench=bench)
File “/home/erpnext/bench-repo/bench/utils.py”, line 427, in run_frappe_cmd
subprocess.check_call((f, ‘-m’, ‘frappe.utils.bench_helper’, ‘frappe’) + arg s, cwd=sites_dir)
File “/usr/lib/python2.7/subprocess.py”, line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘(’/home/erpnext/frappe-bench/env/bin/pyt hon’, ‘-m’, ‘frappe.utils.bench_helper’, ‘frappe’, ‘–site’, ‘all’, ‘migrate’)’ returned non-zero exit status 1

erpnext@erpnext-vm:~$ cd ~/frappe-bench/
erpnext@erpnext-vm:~/frappe-bench$ bench update --patch
Migrating erpnext.erpnext-vm
Executing erpnext.patches.v5_0.rename_table_fieldnames in erpnext.erpnext-vm (erpnext)
/home/erpnext/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.json missing
/home/erpnext/frappe-bench/apps/frappe/frappe/core/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.json missing
rename_field: taxes not found in Sales Taxes and Charges Master
rename_field: territories not found in Sales Taxes and Charges Master
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/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 77, in
main()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 14, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/home/erpnext/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/erpnext/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/erpnext/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/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/commands.py”, line 28, in func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/commands.py”, line 205, in migrate
frappe.modules.patch_handler.run_all()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/patches/v5_0/rename_table_fieldnames.py”, line 235, in execute
rename_field(dt, field[0], field[1])
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/init.py”, line 79, in rename_field
meta = frappe.get_meta(doctype, cached=False)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 506, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/meta.py”, line 20, in get_meta
return Meta(doctype)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/meta.py”, line 49, in init
super(Meta, self).init(“DocType”, doctype)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 76, in init
self.load_from_db()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/meta.py”, line 54, in load_from_db
super(Meta, self).load_from_db()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 106, in load_from_db
frappe.throw(
(“{0} {1} not found”).format(
(self.doctype), self.name), frappe.DoesNotExistError)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 250, in throw
msgprint(msg, raise_exception=exc)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 243, in msgprint
_raise_exception()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 228, in _raise_exception
raise raise_exception, encode(msg)
frappe.exceptions.DoesNotExistError: DocType Purchase Taxes and Charges Template not found
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/erpnext/bench-repo/bench/cli.py”, line 55, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/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-3.3-py2.7.egg/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench-repo/bench/cli.py”, line 247, in update
patch_sites()
File “/home/erpnext/bench-repo/bench/utils.py”, line 118, in patch_sites
run_frappe_cmd(‘–site’, ‘all’, ‘migrate’, bench=bench)
File “/home/erpnext/bench-repo/bench/utils.py”, line 427, 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 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘(’/home/erpnext/frappe-bench/env/bin/python’, ‘-m’, ‘frappe.utils.bench_helper’, ‘frappe’, ‘–site’, ‘all’, ‘migrate’)’ returned non-zero exit status 1

Run

bench retry-upgrade

Thanks it worked fine.

After login I get this pop message
“Redis cache server not running. Please contact Administrator / Tech support”

what should i do?

Did you restart the services as advised in the end?

Yes I did so. Let me try to restart the server too

Error is still persistent

I would look at the sql settings as a potential problem. I had the same errors upgrading the demo vm. The update process is a very painful part of this project I am afraid… Look at your site config and copy the password down. Then see if you can login with that password from sql. In my case my DB somehow lost access to the site db and I had to recreate it. Also make sure you have the right client tools loaded for MariaDB.