I I have created a sample webhook to check if the document conditions are matching. After completing the testing, I deleted the webhook. However, the error logs still show the following error.
Title
frappe.integrations.doctype.webhook.webhook.enqueue_webhook
method
Error
Traceback with variables (most recent call last):
File “apps/frappe/frappe/utils/background_jobs.py”, line 175, in execute_job
retval = method(**kwargs)
site = ‘xyz.abc.com’
method = <function enqueue_webhook at 0x7fc0056860e0>
event = None
job_name = ‘frappe.integrations.doctype.webhook.webhook.enqueue_webhook’
kwargs = {‘doc’: <Communication: 7f736fe581>, ‘webhook’: {‘name’: ‘HOOK-0001’, ‘condition’: ‘doc.status==“Open”\n’, ‘webhook_docevent’: ‘after_insert’, ‘webhook_doctype’: ‘Communication’}}
user = ‘Administrator’
is_async = True
retry = 0
retval = None
method_name = ‘frappe.integrations.doctype.webhook.webhook.enqueue_webhook’
before_job_task = ‘frappe.monitor.start’
File “apps/frappe/frappe/integrations/doctype/webhook/webhook.py”, line 115, in enqueue_webhook
webhook: Webhook = frappe.get_doc(“Webhook”, webhook.get(“name”))
doc = <Communication: 7f736fe581>
webhook = {‘name’: ‘HOOK-0001’, ‘condition’: ‘doc.status==“Open”\n’, ‘webhook_docevent’: ‘after_insert’, ‘webhook_doctype’: ‘Communication’}
File “apps/frappe/frappe/init.py”, line 1168, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
args = (‘Webhook’, ‘HOOK-0001’)
kwargs = {}
frappe = <module ‘frappe’ from ‘apps/frappe/frappe/init.py’>
File “apps/frappe/frappe/model/document.py”, line 75, in get_doc
return controller(*args, **kwargs)
args = (‘Webhook’, ‘HOOK-0001’)
kwargs = {}
doctype = ‘Webhook’
controller = <class ‘frappe.integrations.doctype.webhook.webhook.Webhook’>
File “apps/frappe/frappe/model/document.py”, line 107, in init
self.load_from_db()
self = <Webhook: HOOK-0001>
args = (‘Webhook’, ‘HOOK-0001’)
kwargs = {}
class = <class ‘frappe.model.document.Document’>
File “apps/frappe/frappe/model/document.py”, line 159, in load_from_db
frappe.throw(
self = <Webhook: HOOK-0001>
get_value_kwargs = {‘for_update’: None, ‘as_dict’: True, ‘order_by’: None}
d = None
class = <class ‘frappe.model.document.Document’>
File “apps/frappe/frappe/init.py”, line 523, in throw
msgprint(
msg = ‘Webhook HOOK-0001 not found’
exc = <class ‘frappe.exceptions.DoesNotExistError’>
title = None
is_minimizable = False
wide = False
as_list = False
File “apps/frappe/frappe/init.py”, line 491, in msgprint
_raise_exception()
title = None
as_table = False
as_list = False
indicator = ‘red’
alert = False
primary_action = None
is_minimizable = False
wide = False
sys = <module ‘sys’ (built-in)>
out = {‘message’: ‘Webhook HOOK-0001 not found’, ‘title’: ‘Message’, ‘indicator’: ‘red’, ‘raise_exception’: 1}
_raise_exception = <function msgprint.._raise_exception at 0x7fc005698430>
_strip_html_tags = <functools._lru_cache_wrapper object at 0x7fc00571f110>
inspect = <module ‘inspect’ from ‘/usr/lib/python3.10/inspect.py’>
msg = ‘Webhook HOOK-0001 not found’
raise_exception = <class ‘frappe.exceptions.DoesNotExistError’>
strip_html_tags = <function strip_html_tags at 0x7fc00955a7a0>
File “apps/frappe/frappe/init.py”, line 440, in _raise_exception
raise raise_exception(msg)
inspect = <module ‘inspect’ from ‘/usr/lib/python3.10/inspect.py’>
msg = ‘Webhook HOOK-0001 not found’
raise_exception = <class ‘frappe.exceptions.DoesNotExistError’>
frappe.exceptions.DoesNotExistError: Webhook HOOK-0001 not found