8000 fix: notification cron failed by ahmadpak · Pull Request #131 · shridarpatil/frappe_whatsapp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: notification cron failed #131

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

Open
wants to merge 2 commits into
base: master 8000
Choose a base branch
from

Conversation

ahmadpak
Copy link
@ahmadpak ahmadpak commented Apr 3, 2025

Notification cron failing because of un handled case.
image

Traceback with variables (most recent call last):
8000

  File "apps/frappe/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py", line 144, in execute
    frappe.get_attr(self.method)()
      self = <ScheduledJobType: utils.trigger_whatsapp_notifications_hourly_long>
  File "apps/frappe_whatsapp/frappe_whatsapp/utils/__init__.py", line 90, in trigger_whatsapp_notifications_hourly_long
    trigger_whatsapp_notifications("Hourly Long")
  File "apps/frappe_whatsapp/frappe_whatsapp/utils/__init__.py", line 110, in trigger_whatsapp_notifications
    frappe.get_doc(
      event = 'Hourly Long'
  File "apps/frappe/frappe/__init__.py", line 1299, in get_doc
    return frappe.model.document.get_doc(*args, **kwargs)
      args = ('WhatsApp Notification', None)
      kwargs = {}
      frappe = <module 'frappe' from 'apps/frappe/frappe/__init__.py'>
  File "apps/frappe/frappe/model/document.py", line 85, in get_doc
    return controller(*args, **kwargs)
      args = ('WhatsApp Notification', None)
      kwargs = {}
      doctype = 'WhatsApp Notification'
      controller = <class 'frappe_whatsapp.frappe_whatsapp.doctype.whatsapp_notification.whatsapp_notification.WhatsAppNotification'>
  File "apps/frappe/frappe/model/document.py", line 126, in __init__
    self.load_from_db()
      self = <WhatsAppNotification: unsaved>
      args = ('WhatsApp Notification', None)
      kwargs = {}
      __class__ = <class 'frappe.model.document.Document'>
  File "apps/frappe/frappe/model/document.py", line 179, in load_from_db
    frappe.throw(
      self = <WhatsAppNotification: unsaved>
      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 606, in throw
    msgprint(
      msg = 'WhatsApp Notification None not found'
      exc = DoesNotExistError('WhatsApp Notification None not found')
      title = None
      is_minimizable = False
      wide = False
      as_list = False
      primary_action = None
  File "apps/frappe/frappe/__init__.py", line 571, in msgprint
    _raise_exception()
      msg = 'WhatsApp Notification None not found'
      title = None
      raise_exception = DoesNotExistError('WhatsApp Notification None not found')
      as_table = False
      as_list = False
      indicator = 'red'
      alert = False
      primary_action = None
      is_minimizable = False
      wide = False
      realtime = False
      sys = <module 'sys' (built-in)>
      _raise_exception = <function msgprint.<locals>._raise_exception at 0x7f11ab3fa700>
      inspect = <module 'inspect' from '/home/ubuntu/.pyenv/versions/3.11.9/lib/python3.11/inspect.py'>
      out = {'message': 'WhatsApp Notification None not found', 'title': 'Message', 'indicator': 'red', 'raise_exception': 1, '__frappe_exc_id': 'dd63055202481173bc31e73d7f5bf6462ea5db60b40c2987b04ea06d'}
  File "apps/frappe/frappe/__init__.py", line 522, in _raise_exception
    raise exc
      exc = DoesNotExistError('WhatsApp Notification None not found')
      inspect = <module 'inspect' from '/home/ubuntu/.pyenv/versions/3.11.9/lib/python3.11/inspect.py'>
      msg = 'WhatsApp Notification None not found'
      out = {'message': 'WhatsApp Notification None not found', 'title': 'Message', 'indicator': 'red', 'raise_exception': 1, '__frappe_exc_id': 'dd63055202481173bc31e73d7f5bf6462ea5db60b40c2987b04ea06d'}
      raise_exception = DoesNotExistError('WhatsApp Notification None not found')
frappe.exceptions.DoesNotExistError: WhatsApp Notification None not found

@ahmadpak ahmadpak marked this pull request as ready for review April 3, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0