Upgrade to v5 failed?

Hi,

I have setup erpnext via easy-script install (v4.25.1).
I run bench update to upgrade to latest v5:

ubuntu@ip-172-31-16-47:~/frappe-bench$ bench update
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/frappe/bench
1e8fda2…4999929 master -> origin/master
Updating 1e8fda2…4999929
Fast-forward
install_scripts/setup_frappe.sh | 6 ++±–
1 file changed, 3 insertions(+), 3 deletions(-)
remote: Counting objects: 106, done.
remote: Compressing objects: 100% (102/102), done.
remote: Total 106 (delta 86), reused 24 (delta 4), pack-reused 0
Receiving objects: 100% (106/106), 9.11 KiB | 0 bytes/s, done.
Resolving deltas: 100% (86/86), completed with 42 local objects.
From https://github.com/frappe/frappe
3c77230…dde3a3f develop -> upstream/develop
From https://github.com/frappe/erpnext

  • branch master -> FETCH_HEAD
    Already up-to-date.
    From https://github.com/frappe/shopping-cart
  • branch master -> FETCH_HEAD
    Already up-to-date.
    From https://github.com/frappe/frappe
  • branch master -> FETCH_HEAD
    Already up-to-date.
    database backup taken - ./site2/private/backups/20150422_13230490_database.sql.gz - on 2015-04-22 15:09:25.315288
    database backup taken - ./site1.local/private/backups/20150422_86696082_database.sql.gz - on 2015-04-22 16:39:26.340910
    database backup taken - ./site2.ec2-54-201-165-130.us-west-2.compute.amazonaws.com/private/backups/20150422_67955932_database.sql.gz - on 2015-04-22 15:09:27.024945

Running latest for site2

Updating frappe : [========================================]
Updating erpnext : [========================================]

Running latest for site1.local

Updating frappe : [========================================]
Updating erpnext : [========================================]
Updating shopping_cart : [========================================]

Running latest for site2.ec2-54-201-165-130.us-west-2.compute.amazonaws.com

Updating frappe : [========================================]
Updating erpnext : [========================================]
Wrote ./assets/js/frappe-web.min.js - 90k
Wrote ./assets/js/shopping-cart-web.min.js - 1k
Wrote ./assets/js/print_format_v3.min.js - 18k
Wrote ./assets/js/erpnext.min.js - 15k
Wrote ./assets/css/frappe.css - 221k
Wrote ./assets/css/frappe-web.css - 163k
Wrote ./assets/css/shopping-cart-web.css - 0k
Wrote ./assets/js/editor.min.js - 27k
Wrote ./assets/css/erpnext.css - 0k
Wrote ./assets/js/frappe.min.js - 610k
Wrote ./assets/js/erpnext-web.min.js - 0k
Wrote ./assets/js/slickgrid.min.js - 105k
Wrote ./assets/js/canvasResize.min.js - 22k
frappe-web: stopped
frappe-workerbeat: stopped
frappe-worker: stopped
frappe-web: started
frappe-workerbeat: started
frappe-worker: started

Then I refreshed the page, it;s still current v4.25.1

What’s wrong? What I missed here?

Thanks

Try:

bench retry-upgrade

@adityaduggal, I run your command and got this:

Your bench was upgraded to version 5
As you have setup your bench for production, you will have to reload configuration for nginx and supervisor
To complete the migration, please run the following commands

sudo service nginx restart
sudo supervisorctl reload

sudo service nginx restart
*restarting nginx nginx [failed]

I opened browrser, it’s still v4

bench switch-to-develop
bench retry-upgrade

@pdvyas, I run :smile:
bench switch-to-develop
bench retry-upgrade


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

  • branch develop -> FETCH_HEAD
    Already up-to-date.
    From https://github.com/frappe/shopping-cart
  • branch develop -> FETCH_HEAD
    Already up-to-date.
    From https://github.com/frappe/frappe
  • branch develop -> FETCH_HEAD
    Already up-to-date.
    Migrating site2
    Executing frappe.patches.v5_0.convert_to_barracuda_and_utf8mb4 in site2 (12d1ea3 7ad)
    Success
    Executing execute:frappe.reload_doc(‘core’, ‘doctype’, ‘docfield’, force=True) # 2015-01-01 in site2 (12d1ea37ad)
    Success
    Executing execute:frappe.reload_doc(‘email’, ‘doctype’, ‘email_alert’) #2014-07- 15 in site2 (12d1ea37ad)
    Success
    Executing execute:frappe.reload_doc(‘desk’, ‘doctype’, ‘todo’) #2014-12-31-1 in site2 (12d1ea37ad)
    Success
    Executing execute:frappe.reload_doc(‘custom’, ‘doctype’, ‘property_setter’) #201 4-12-31-1 in site2 (12d1ea37ad)
    Success
    Executing frappe.patches.v5_0.v4_to_v5 in site2 (12d1ea37ad)
    Success
    Executing frappe.patches.v5_0.remove_shopping_cart_app in site2 (12d1ea37ad)
    Success
    Executing execute:frappe.permissions.reset_perms(“Module Def”) in site2 (12d1ea3 7ad)
    Success
    Executing execute:frappe.permissions.reset_perms(“User”) #2015-03-24 in site2 (1 2d1ea37ad)
    Success
    Executing frappe.patches.v5_0.rename_table_fieldnames in site2 (12d1ea37ad)
    Success
    Executing frappe.patches.v5_0.communication_parent in site2 (12d1ea37ad)
    Success
    Executing frappe.patches.v5_0.clear_website_group_and_notifications in site2 (12 d1ea37ad)
    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 site2 (12d1ea37ad)
    Success
    Executing frappe.patches.v5_0.fix_feed in site2 (12d1ea37ad)
    Success
    Executing frappe.patches.v5_0.update_shared in site2 (12d1ea37ad)
    Success
    Executing frappe.patches.v5_0.bookmarks_to_stars in site2 (12d1ea37ad)
    Success
    Executing frappe.patches.v5_0.style_settings_to_website_theme in site2 (12d1ea37 ad)
    Success
    Executing frappe.patches.v5_0.rename_ref_type_fieldnames in site2 (12d1ea37ad)
    Success
    Executing frappe.patches.v5_0.fix_email_alert in site2 (12d1ea37ad)
    Success
    Executing frappe.patches.v5_0.fix_null_date_datetime in site2 (12d1ea37ad)
    Success
    Executing frappe.patches.v5_0.force_sync_website in site2 (12d1ea37ad)
    Success
    Executing execute:frappe.delete_doc(“DocType”, “Tag”) in site2 (12d1ea37ad)
    Success
    Executing execute:frappe.permissions.reset_perms(“GL Entry”) #2014-06-09 in site 2 (12d1ea37ad)
    Success
    Executing execute:frappe.permissions.reset_perms(“Stock Ledger Entry”) #2014-06- 09 in site2 (12d1ea37ad)
    Success
    Executing execute:frappe.rename_doc(“DocType”, “Support Ticket”, “Issue”, force= True) in site2 (12d1ea37ad)
    Success
    Executing erpnext.patches.v4_4.make_email_accounts in site2 (12d1ea37ad)
    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/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, lin e 77, in
    main()
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, lin e 14, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/co re.py”, line 664, in call
    return self.main(*args, **kwargs)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/co re.py”, line 644, in main
    rv = self.invoke(ctx)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/co re.py”, line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/co re.py”, line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/co re.py”, line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/co re.py”, line 464, in invoke
    return callback(*args, **kwargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands.py”, line 28, in _ func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands.py”, line 202, in migrate
    frappe.modules.patch_handler.run_all()
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
    if not run_single(patchmodule = patch):
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + “.execute”)()
    File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/patches/v4_4/make_email_a ccounts.py”, line 5, in execute
    frappe.reload_doc(“email”, “doctype”, “email_account”)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 538, in reload_doc
    return frappe.modules.reload_doc(module, dt, dn, force=force)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/init.py”, line 37, in reload_doc
    return import_files(module, dt, dn, force=force)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/import_file.py”, li ne 17, in import_files
    return import_file(module, dt, dn, force=force)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/import_file.py”, li ne 22, in import_file
    ret = import_file_by_path(path, force)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/import_file.py”, li ne 54, in import_file_by_path
    import_doc(doc, force=force, data_import=data_import)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/import_file.py”, li ne 120, in import_doc
    doc.insert()
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 19 4, in insert
    self.run_post_save_methods()
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 55 8, in run_post_save_methods
    self.run_method(“on_update”)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 50 6, in run_method
    return Document.hook(fn)(self, *args, **kwargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 61 9, in composer
    return composed(self, method, *args, **kwargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 60 2, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 50 0, in
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctyp e.py”, line 114, in on_update
    self.run_module_method(“on_doctype_update”)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctyp e.py”, line 123, in run_module_method
    module = load_doctype_module(self.name, self.module)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/init.py”, line 62, in load_doctype_module
    doctype_python_modules[key] = frappe.get_module(get_module_name(doctype, mod ule, prefix))
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 547, in get_module
    return importlib.import_module(modulename)
    File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
    import(name)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/email/doctype/email_account /email_account.py”, line 10, in
    from frappe.email.receive import POP3Server, Email
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/email/receive.py”, line 11, in
    from email_reply_parser import EmailReplyParser
    ImportError: No module named email_reply_parser
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 9, in
    load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
    File “/home/ubuntu/bench-repo/bench/cli.py”, line 55, in cli
    bench()
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in ca ll
    return self.main(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
    rv = self.invoke(ctx)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invo ke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invo ke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invo ke
    return callback(*args, **kwargs)
    File “/home/ubuntu/bench-repo/bench/cli.py”, line 263, in retry_upgrade
    patch_sites()
    File “/home/ubuntu/bench-repo/bench/utils.py”, line 118, in patch_sites
    run_frappe_cmd(’–site’, ‘all’, ‘migrate’, bench=bench)
    File “/home/ubuntu/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 540, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command ‘(’/home/ubuntu/frappe-bench/env/bin/pyth on’, ‘-m’, ‘frappe.utils.bench_helper’, ‘frappe’, ‘–site’, ‘all’, ‘migrate’)’ r eturned non-zero exit status 1

Now I cannot access the site, error page… I reinstalled again using easy script but got fatalerror: bench-repo already exists… How to to do fresh-install again on the same machine? How to clean everything…

Pls anybody who can help.

Tks

Did you remove everything??

Just run,

bench update --requirements
bench retry-upgrade

run benh update again and:

ubuntu@ip-172-31-16-47:~$ bench update
Already up-to-date.
From https://github.com/frappe/erpnext

  • branch develop -> FETCH_HEAD
    Already up-to-date.
    From https://github.com/frappe/shopping-cart
  • branch develop -> FETCH_HEAD
    Already up-to-date.
    From https://github.com/frappe/frappe
  • branch develop -> FETCH_HEAD
    Already up-to-date.
    Migrating site2
    Executing erpnext.patches.v5_0.rename_total_fields in site2 (12d1ea37ad)
    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/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 77, in
    main()
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 14, in main
    click.Group(commands=commands)(prog_name=‘bench’)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 664, in call
    return self.main(*args, **kwargs)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 644, in main
    rv = self.invoke(ctx)
    File “/home/ubuntu/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/ubuntu/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/ubuntu/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/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 464, in invoke
    return callback(*args, **kwargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands.py”, line 28, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands.py”, line 202, in migrate
    frappe.modules.patch_handler.run_all()
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
    if not run_single(patchmodule = patch):
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + “.execute”)()
    File “/home/ubuntu/frappe-bench/apps/erpnext/erpnext/patches/v5_0/rename_total_fields.py”, line 46, in execute
    base_net_total = frappe.db.sql("select sum(ifnull({0}, 0)) from tab{1}".format(fields[0][1], dt))[0][0]
    File “/home/ubuntu/frappe-bench/apps/frappe/frappe/database.py”, line 143, in sql
    self._cursor.execute(query)
    File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
    self.errorhandler(self, exc, value)
    File “/home/ubuntu/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 ‘base_net_total’ in ‘field list’”)
    Traceback (most recent call last):
    File “/usr/local/bin/bench”, line 9, in
    load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
    File “/home/ubuntu/bench-repo/bench/cli.py”, line 55, in cli
    bench()
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in call
    return self.main(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
    rv = self.invoke(ctx)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invoke
    return callback(*args, **kwargs)
    File “/home/ubuntu/bench-repo/bench/cli.py”, line 247, in update
    patch_sites()
    File “/home/ubuntu/bench-repo/bench/utils.py”, line 118, in patch_sites
    run_frappe_cmd(’–site’, ‘all’, ‘migrate’, bench=bench)
    File “/home/ubuntu/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 540, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command ‘(’/home/ubuntu/frappe-bench/env/bin/python’, ‘-m’, ‘frappe.utils.bench_helper’, ‘frappe’, ‘–site’, ‘all’, ‘migrate’)’ returned non-zero exit status 1

I did not remove anything…

What should I do?

This is another issue. I think @nabinhait pushed a fix. Run

bench retry-upgrade

Successfully upgrade to v5. Thanks

But my transaction records are gone. User records are still there…

What? Do you mean that you lost all transactions or is the screen not loading? Can you check with the report view?

No, I was wrong… the data is still there.

Tks

Everytime I login, it shows me this message:
Redis cache server not running. Please contact Administrator / Tech support

What does it mean? What to do?

Tks

I think this may help :smile:

sudo supervisorctl reload
sudo service nginx reload

Sorry, message is not going with above command. I tried at my end.

I tested again by running retry-upgrade again with followup. Now its not coming

bench retry-upgrade
sudo service nginx restart
sudo supervisorctl reload

I run the commands but still I get the message:
Redis cache server not running. Please contact Administrator / Tech support
Something new about this issue?

Just tried to upgrade to v5 from fresh install v4.

Executing erpnext.patches.v5_0.rename_table_fieldnames in site1.local (1bd3e0294d)
/home/ubuntu/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.json missing
/home/ubuntu/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/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 77, in
main()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 14, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/home/ubuntu/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/ubuntu/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/ubuntu/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/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands.py”, line 28, in func
ret = f(frappe.dict(ctx.obj), *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands.py”, line 205, in migrate
frappe.modules.patch_handler.run_all()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 25, in run_all
if not run_single(patchmodule = patch):
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 52, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 68, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/ubuntu/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/ubuntu/frappe-bench/apps/frappe/frappe/model/init.py”, line 79, in rename_field
meta = frappe.get_meta(doctype, cached=False)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 506, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/meta.py”, line 20, in get_meta
return Meta(doctype)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/meta.py”, line 49, in init
super(Meta, self).init(“DocType”, doctype)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/document.py”, line 76, in init
self.load_from_db()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/model/meta.py”, line 54, in load_from_db
super(Meta, self).load_from_db()
File “/home/ubuntu/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/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 250, in throw
msgprint(msg, raise_exception=exc)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 243, in msgprint
_raise_exception()
File “/home/ubuntu/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/ubuntu/bench-repo/bench/cli.py”, line 55, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/ubuntu/bench-repo/bench/cli.py”, line 303, in _switch_to_develop
switch_to_develop(upgrade=upgrade)
File “/home/ubuntu/bench-repo/bench/app.py”, line 174, in switch_to_develop
switch_branch(‘develop’, apps=apps, bench=bench, upgrade=upgrade)
File “/home/ubuntu/bench-repo/bench/app.py”, line 166, in switch_branch
patch_sites()
File “/home/ubuntu/bench-repo/bench/utils.py”, line 118, in patch_sites
run_frappe_cmd(’–site’, ‘all’, ‘migrate’, bench=bench)
File “/home/ubuntu/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 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘(’/home/ubuntu/frappe-bench/env/bin/python’, ‘-m’, ‘frappe.utils.bench_helper’, ‘frappe’, ‘–site’, ‘all’, ‘migrate’)’ returned non-zero exit status 1

Now on browser shows "Updating. We will be back in a few moments…"

Please anybody help…

Tks a lot