Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during uninstall #100

Closed
ajiragroup opened this issue Aug 31, 2024 · 1 comment
Closed

Error during uninstall #100

ajiragroup opened this issue Aug 31, 2024 · 1 comment

Comments

@ajiragroup
Copy link

ajiragroup commented Aug 31, 2024

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/anupd/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
    main()
  File "/home/anupd/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
    click.Group(commands=commands)(prog_name="bench")
  File "/home/anupd/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/anupd/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/anupd/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/anupd/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/anupd/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/anupd/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/anupd/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/anupd/frappe-bench/apps/frappe/frappe/commands/site.py", line 865, in uninstall
    remove_app(app_name=app, dry_run=dry_run, yes=yes, no_backup=no_backup, force=force)
  File "/home/anupd/frappe-bench/apps/frappe/frappe/installer.py", line 401, in remove_app
    frappe.get_single("Installed Applications").update_versions()
  File "/home/anupd/frappe-bench/apps/frappe/frappe/core/doctype/installed_applications/installed_applications.py", line 39, in update_versions
    self.save()
  File "/home/anupd/frappe-bench/apps/frappe/frappe/model/document.py", line 337, in save
    return self._save(*args, **kwargs)
  File "/home/anupd/frappe-bench/apps/frappe/frappe/model/document.py", line 373, in _save
    self.run_before_save_methods()
  File "/home/anupd/frappe-bench/apps/frappe/frappe/model/document.py", line 1085, in run_before_save_methods
    self.run_method("before_validate")
  File "/home/anupd/frappe-bench/apps/frappe/frappe/model/document.py", line 962, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/anupd/frappe-bench/apps/frappe/frappe/model/document.py", line 1322, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/anupd/frappe-bench/apps/frappe/frappe/model/document.py", line 1306, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
  File "/home/anupd/frappe-bench/apps/frappe_whatsapp/frappe_whatsapp/utils/__init__.py", line 17, in run_server_script_for_doc_event
    notification = get_notifications_map().get(
  File "/home/anupd/frappe-bench/apps/frappe_whatsapp/frappe_whatsapp/utils/__init__.py", line 36, in get_notifications_map
    enabled_whatsapp_notifications = frappe.get_all(
  File "/home/anupd/frappe-bench/apps/frappe/frappe/__init__.py", line 2057, in get_all
    return get_list(doctype, *args, **kwargs)
  File "/home/anupd/frappe-bench/apps/frappe/frappe/__init__.py", line 2032, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
  File "/home/anupd/frappe-bench/apps/frappe/frappe/model/db_query.py", line 185, in execute
    self.columns = self.get_table_columns()
  File "/home/anupd/frappe-bench/apps/frappe/frappe/model/db_query.py", line 546, in get_table_columns
    return get_table_columns(self.doctype)
  File "/home/anupd/frappe-bench/apps/frappe/frappe/model/meta.py", line 73, in get_table_columns
    return frappe.db.get_table_columns(doctype)
  File "/home/anupd/frappe-bench/apps/frappe/frappe/database/database.py", line 1197, in get_table_columns
    raise self.TableMissingError("DocType", doctype)
pymysql.err.ProgrammingError: ('DocType', 'WhatsApp Notification')

Upon giving uninstall command again:

anupd@Laptop-AD:~/frappe-bench/apps/frappe_whatsapp$ bench --site site1.local uninstall-app frappe_whatsapp
App frappe_whatsapp not installed on Site site1.local

But when trying to remove app,

anupd@Laptop-AD:~/frappe-bench/apps/frappe_whatsapp$ bench remove-app frappe_whatsapp
Checking if app installed on active sites...
ERROR: Cannot remove, app is installed on site: site1.local
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 132, in cli
    bench_command()
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/commands/make.py", line 221, in remove_app
    bench.uninstall(app_name, no_backup=no_backup, force=force)
  File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 128, in uninstall
    self.validate_app_uninstall(app)
  File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 55, in validate_app_uninstall
    validate_app_installed_on_sites(app, bench_path=self.name)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py", line 591, in validate_app_installed_on_sites
    ret = check_app_installed(app, bench_path=bench_path)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py", line 616, in check_app_installed
    raise ValidationError(f"Cannot remove, app is installed on site: {site}")
bench.exceptions.ValidationError: Cannot remove, app is installed on site: site1.local
Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant