Subscription error

Hello Community,
I get the follows errors when tried to do a Sales Invoice Subscription.

ERPNext: v9.1.7 (master)
Frappe Framework: v9.1.9 (master)

Thanks!

Error 1

Traceback (most recent call last):
  File "/home/erp/erpnext/apps/erpnext/erpnext/accounts/doctype/subscription/subscription.py", line 144, in create_documents
    doc = make_new_document(data, schedule_date)
  File "/home/erp/erpnext/apps/erpnext/erpnext/accounts/doctype/subscription/subscription.py", line 190, in make_new_document
    update_doc(new_doc, doc , args, schedule_date)
  File "/home/erp/erpnext/apps/erpnext/erpnext/accounts/doctype/subscription/subscription.py", line 220, in update_doc
    from_date = get_next_date(args.from_date, mcount)
  File "/home/erp/erpnext/apps/erpnext/erpnext/accounts/doctype/subscription/subscription.py", line 239, in get_next_date
    dt += relativedelta(months=mcount, day=day)
  File "/home/erp/erpnext/env/local/lib/python2.7/site-packages/dateutil/relativedelta.py", line 216, in __init__
    self._fix()
  File "/home/erp/erpnext/env/local/lib/python2.7/site-packages/dateutil/relativedelta.py", line 239, in _fix
    if abs(self.months) > 11:
TypeError: bad operand type for abs(): 'NoneType'

Error 2

erpnext.accounts.doctype.subscription.subscription.make_subscription_entry

{'retry': 0, 'log': <function log at 0x7f67370911b8>, 'site': u'facturacion', 'event': u'hourly', 'method_name': u'erpnext.accounts.doctype.subscription.subscription.make_subscription_entry', 'method': <function make_subscription_entry at 0x7f67370ab848>, 'user': u'Administrator', 'kwargs': {}, 'async': True, 'job_name': u'erpnext.accounts.doctype.subscription.subscription.make_subscription_entry'}
Traceback (most recent call last):
  File "/home/erp/erpnext/apps/frappe/frappe/utils/background_jobs.py", line 71, in execute_job
    method(**kwargs)
  File "/home/erp/erpnext/apps/erpnext/erpnext/accounts/doctype/subscription/subscription.py", line 128, in make_subscription_entry
    create_documents(data, schedule_date)
  File "/home/erp/erpnext/apps/erpnext/erpnext/accounts/doctype/subscription/subscription.py", line 160, in create_documents
    notify_error_to_user(data)
  File "/home/erp/erpnext/apps/erpnext/erpnext/accounts/doctype/subscription/subscription.py", line 185, in notify_error_to_user
    notify_errors(data.reference_document, data.reference_doctype, party, data.owner, data.name)
  File "/home/erp/erpnext/apps/erpnext/erpnext/accounts/doctype/subscription/subscription.py", line 267, in notify_errors
    message = frappe.get_template("templates/emails/recurring_document_failed.html").render({
  File "/home/erp/erpnext/apps/frappe/frappe/utils/jinja.py", line 23, in get_template
    return get_jenv().get_template(path)
  File "/home/erp/erpnext/env/local/lib/python2.7/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/home/erp/erpnext/env/local/lib/python2.7/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/home/erp/erpnext/env/local/lib/python2.7/site-packages/jinja2/loaders.py", line 405, in load
    return loader.load(environment, name, globals)
  File "/home/erp/erpnext/env/local/lib/python2.7/site-packages/jinja2/loaders.py", line 125, in load
    code = environment.compile(source, name, filename)
  File "/home/erp/erpnext/env/local/lib/python2.7/site-packages/jinja2/environment.py", line 591, in compile
    self.handle_exception(exc_info, source_hint=source_hint)
  File "/home/erp/erpnext/env/local/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/erp/erpnext/apps/erpnext/erpnext/./templates/emails/recurring_document_failed.html", line 5, in template
    <p>{{_("To stop sending repetitive error notifications from the system, we have checked "Disabled" field in the subscription")}} {{ subscription}} {{_("for the")}} {{ type }} {{ name }}.</p>
TemplateSyntaxError: expected token ',', got 'Disabled'

@froldan

Thanks for reporting an error, I have created Github issue for the same and soon we’ll fix this issue.
When system trying to notify to admin about the recurring document failed, the error is coming due to wrong translation. Kindly check the subscription’s reference document, system not able to make recurring of it. Can you please share for which doctype you’re making the recurring document

1 Like

@froldan

We have fixed this issue, please pull latest update and check

@rohit_w Thanks! I will pull the latest changes.