From a94befbc217ccfaa138c13c2e666b8a5e391a1ea Mon Sep 17 00:00:00 2001 From: Himanshu Date: Mon, 22 Jul 2019 11:15:31 +0530 Subject: [PATCH] Update file.py --- frappe/core/doctype/file/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/core/doctype/file/file.py b/frappe/core/doctype/file/file.py index 837da3056e..47df90d18c 100755 --- a/frappe/core/doctype/file/file.py +++ b/frappe/core/doctype/file/file.py @@ -683,7 +683,7 @@ def get_web_image(file_url): frappe.msgprint(_("Unable to read file format for {0}").format(file_url)) raise - image = Image.open(StringIO(str(r.content))) + image = Image.open(StringIO(frappe.safe_decode(r.content))) try: filename, extn = file_url.rsplit("/", 1)[1].rsplit(".", 1)