Version-14 Custom Print format - Console

Traceback (most recent call last):
File “apps/frappe/frappe/”, line 69, in application
response = frappe.api.handle()
File “apps/frappe/frappe/”, line 54, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/”, line 45, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/”, line 83, in execute_cmd
return, **frappe.form_dict)
File “apps/frappe/frappe/”, line 1587, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/www/”, line 294, in get_html_and_style
html = get_rendered_template(
File “apps/frappe/frappe/www/”, line 207, in get_rendered_template
html = template.render(args, filters={“len”: len})
File “env/lib/python3.10/site-packages/jinja2/”, line 1301, in render
File “env/lib/python3.10/site-packages/jinja2/”, line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File “”, line 142, in top-level template code
File “env/lib/python3.10/site-packages/jinja2/”, line 393, in call
return, *args, **kwargs)
File “apps/frappe/frappe/model/”, line 1094, in get_formatted
df.fieldtype == “Currency”
AttributeError: ‘NoneType’ object has no attribute ‘fieldtype’

I have litterally the same error (including line numbers) after a ERPNext 13 to 14 upgrade.
Anyone found what to do ?

Any solutions ?

1 Like

Hi everybody, I have the same problem, any solution?

It means fieldname you are using does not exists in table. Pass the correct fieldname in doc.get_formatted().

1 Like

Thank you, the field was still in custom print format, but after removing it, the issue was resolved.