[fix] encode if letterhead
diff --git a/erpnext/utilities/user_progress_utils.py b/erpnext/utilities/user_progress_utils.py
index 18d38c0..58a03e3 100644
--- a/erpnext/utilities/user_progress_utils.py
+++ b/erpnext/utilities/user_progress_utils.py
@@ -40,12 +40,12 @@
@frappe.whitelist()
def create_letterhead(args_data):
args = json.loads(args_data)
- letterhead = args.get("letterhead").encode('utf-8')
+ letterhead = args.get("letterhead")
if letterhead:
try:
frappe.get_doc({
"doctype":"Letter Head",
- "content":"""<div><img src="{0}" style='max-width: 100%%;'><br></div>""".format(letterhead),
+ "content":"""<div><img src="{0}" style='max-width: 100%%;'><br></div>""".format(letterhead.encode('utf-8')),
"letter_head_name": _("Standard"),
"is_default": 1
}).insert()