Server Error DoesNotExistError: Salary Slip Sal Slip not found

When Clicked on link in Email View this in your browser
link href = http://erp.exmple.com/Salary%20Slip/Sal%20Slip/EMP/0001/00006?format=Standard&key=d0be86af7468d81aa84c2c2f166434250a5f46329996b21af1e874b5

site_config.json does have host_name set, site located at ~/frappe-bench/sites/site1.local/

Traceback (innermost last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 69, in application
    response = frappe.website.render.render(request.path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 40, in render
    data = render_page(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 107, in render_page
    return build(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 114, in build
    return build_page(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 127, in build_page
    context = get_context(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py", line 16, in get_context
    context = build_context(context)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py", line 54, in build_context
    ret = module.get_context(context)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 29, in get_context
    doc = frappe.get_doc(frappe.form_dict.doctype, frappe.form_dict.name)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 534, in get_doc
    return frappe.model.document.get_doc(arg1, arg2)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 46, in get_doc
    return controller(arg1, arg2)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 79, in __init__
    self.load_from_db()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 110, in load_from_db
    frappe.throw(_("{0} {1} not found").format(_(self.doctype), self.name), frappe.DoesNotExistError)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 265, in throw
    msgprint(msg, raise_exception=exc)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 258, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 243, in _raise_exception
    raise raise_exception, encode(msg)
 DoesNotExistError: Salary Slip Sal Slip not found

The slashes here are not url-encoded. That seems to be the problem.

Hi @rmehta Any idea, how do I fix it? or any direction in which I should look forward to?

You will have to see how the email is composed (I think this might be custom)

1 Like

Hi @yashodhan, Could you fix this?

nope!