Bench Update Error after v5 upgrade

Hi,

I have just ran the bench update --upgrade command and my account was migrated to v5, but I guess it has run into trouble as the below message came while upgrading:

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/aditya/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 77, in <module>
    main()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 14, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/commands.py", line 28, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/commands.py", line 736, in remove_from_installed_apps
    remove_from_installed_apps(app)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/installer.py", line 149, in remove_from_installed_apps
    post_install()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/installer.py", line 156, in post_install
    init_singles()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/installer.py", line 174, in init_singles
    doc = frappe.new_doc(single)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/__init__.py", line 436, in new_doc
    return get_new_doc(doctype, parent_doc, parentfield)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/model/create_new.py", line 19, in get_new_doc
    "docstatus": 0
  File "/home/aditya/frappe-bench/apps/frappe/frappe/__init__.py", line 460, in get_doc
    return frappe.model.document.get_doc(arg1, arg2)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 43, in get_doc
    controller = get_controller(doctype)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/model/base_document.py", line 27, in get_controller
    module = load_doctype_module(doctype, module_name)
  File "/home/aditya/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, module, prefix))
  File "/home/aditya/frappe-bench/apps/frappe/frappe/__init__.py", line 521, 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 bulk_sms.bulk_sms
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/aditya/bench-repo/bench/cli.py", line 55, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/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/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/aditya/bench-repo/bench/cli.py", line 238, in update
    pre_upgrade(version_upgrade[0], version_upgrade[1])
  File "/home/aditya/bench-repo/bench/utils.py", line 429, in pre_upgrade
    remove_shopping_cart(bench=bench)
  File "/home/aditya/bench-repo/bench/migrate_to_v5.py", line 24, in remove_shopping_cart
    run_frappe_cmd('--site', 'all', 'remove-from-installed-apps', 'shopping_cart', bench=bench)
  File "/home/aditya/bench-repo/bench/utils.py", line 422, 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/aditya/frappe-bench/env/bin/python', '-m', 'frappe.utils.bench_helper', 'frappe', '--site', 'all', 'remove-from-installed-apps', 'shopping_cart')' returned non-zero exit status 1

Also after the update problems I am only getting a BLACK BLANK screen instead of any error on my browser page.

I am still getting the same error, any update on this?

I am assuming this is fixed.

Dear Rmehta
i have the same error when update V5

when open system it gives
Updating. We will be back in a few moments…

Hi,

I am still getting this error:

http://pastebin.com/aKVQV68F

This is after

Executing frappe.patches.v5_0.convert_to_barracuda_and_utf8mb4 in database

Hi Aditya,

Do you have a lot of custom fields in any particular doctype, possibly of type Data or Float?

-Anand.

Yes indeed, I have a lot of custom fields both in data and float type.

I would have to check the report for how many since I cannot recall the same at this stage.

Is having a lot of custom fields creating this issue?

What is expected from my end to be done to resolve this?

Yes, there is a limit to number to columns in a table.

Hi,
Was the problem resolved and how? I am getting same error.

-Amit

If you’re on version 5, yes

How? I am getting the same error. Stack trace is attaced.
http://pastebin.com/ZsHSsYaG#

-Amit