Uninstalled Sendgrid app, email now broken

My email is missing and I’m frustrated by that. This is true for both user and administrator.

The traceback I’m getting is:

Unable to handle success response
desk.min.js?ver=1506883510.0:1482 ReferenceError: email_defaults is not defined
    at eval (eval at setup (form.min.js?ver=1506883510.0:2611), <anonymous>:200:10)
    at Class.setup (form.min.js?ver=1506883510.0:2611)
    at _f.Frm.setup (form.min.js?ver=1506883510.0:172)
    at _f.Frm.refresh (form.min.js?ver=1506883510.0:441)
    at Class.load (form.min.js?ver=1506883510.0:87)
    at form.min.js?ver=1506883510.0:82
    at Object.callback (desk.min.js?ver=1506883510.0:5412)
    at Object.callback [as success_callback] (desk.min.js?ver=1506883510.0:1354)
    at _ (desk.min.js?ver=1506883510.0:1378)
    at Object.<anonymous> (desk.min.js?ver=1506883510.0:1478)
(anonymous) @ desk.min.js?ver=1506883510.0:1482

Not seen this before. probably best to reinstall sendgrid for now, and change email over then. But yes this shouldnt break as badly as that ;-(

It’s broken within the sengrid integration too. I’ve uninstalled and reinstalled it twice. I have no email at all and no way to fix it from the GUI.

So I’ve some success uninstalling this app manually by burning off the warts left in the database. It seems now to be stuck on the favicon of all things. From web.error.log:

[2018-05-23 01:43:34 +0000] [7718] [ERROR] Error handling request /favicon.ico
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 135, in handle
    self.handle_request(listener, req, client, addr)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/local.py", line 228, in application
  return ClosingIterator(app(environ, start_response), self.cleanup)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/wrappers.py", line 308, in application
  resp = f(*args[:-2] + (request,))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 88, in application
  response = handle_exception(e)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 191, in handle_exception
  http_status_code=http_status_code)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 72, in render
  data = render_page(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 149, in render_page
  return build(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 156, in build
  return build_page(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 169, in build_page
  context = get_context(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py", line 15, in get_context
  context = get_page_context(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py", line 35, in get_page_context
  page_context = make_page_context(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py", line 43, in make_page_context
  context = resolve_route(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py", line 18, in resolve_route
  context = get_page_info_from_template(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py", line 59, in get_page_info_from_template
  app_path = frappe.get_app_path(app)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 727, in get_app_path
  return get_pymodule_path(app_name, *joins)
  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 sendgrid_integration

If I can get some help with where to look for the icon storage in the database, I think I can figure it out from there. Until it crashes again.

Seem like there’s module sendgrid_integration exists in modules.txt

There isn’t in either Frappe or ERPNext, but it was worth a look.

image

image

I get basically the same error when I try to migrate:

Migrating agritheory.com
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, 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 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, 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 1066, 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 895, 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 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *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 sendgrid_integration

Can you check if sendgrid_integration exists in your database ?

select defkey, defvalue from `tabDefaultValue` where defkey= "installed_apps";

Yup. Let me try deleting it from that list

image

So I thought I was going to have do some fancy sql to ditch it, then I remember that there’s this bench command bench remove-from-installed-apps which doesn’t do the same thing as uninstall-app or remove-app and I never had a need to use it before. Thanks @magic-overflow, I wouldn’t have thought of it this without your help. Site is up and running.

1 Like