I can't get rid of a custom app and it's stopping my upgrade to ver10

Dear all,

I installed a customized app long time back to try it. I have 3 sites on my server. I think I removed it successfully from site1.local, but I was not that lucky for site2 and site3.

When migrating site2.local I get:

Migrating site2.local
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 94, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, 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 222, 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 27, in run_all
    for patch in get_all_patches():
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 48, in get_all_patches
    patches.extend(frappe.get_file_items(frappe.get_pymodule_path(app, "patches.txt")))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 742, in get_pymodule_path
    return os.path.join(os.path.dirname(get_module(scrub(modulename)).__file__), *joins)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 704, 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 ui_customization

Can you help me overcome this?

Regards,
Ahmed

1 Like

I fixed it by adding the app ui_customization again, installing it to site2.local, then uninstalling it.

bench new-app ui_customization
bench --site site2.local install-app ui_customization
bench --site site2.local list-apps
bench --site site2.local uninstall-app ui_customization

2 Likes