diff --git a/openedx/core/djangoapps/credit/email_utils.py b/openedx/core/djangoapps/credit/email_utils.py
index 36450a594c7bdb970cb9c0ca17bcb1e5a4fc34d3..1313b840e2c61322cb14fad6aa04f79ad0fba7be 100644
--- a/openedx/core/djangoapps/credit/email_utils.py
+++ b/openedx/core/djangoapps/credit/email_utils.py
@@ -171,7 +171,7 @@ def attach_image(img_dict, filename):
     if img_path:
         with open(img_path, 'rb') as img:
             msg_image = MIMEImage(img.read(), name=os.path.basename(img_path))
-            msg_image.add_header('Content-ID', b'<{}>'.format(img_dict['cid']))  # xss-lint: disable=python-wrap-html
+            msg_image.add_header('Content-ID', '<{}>'.format(img_dict['cid']))  # xss-lint: disable=python-wrap-html
             msg_image.add_header("Content-Disposition", "inline", filename=filename)
         return msg_image
 
diff --git a/openedx/core/djangoapps/credit/tests/test_api.py b/openedx/core/djangoapps/credit/tests/test_api.py
index 4a3e5adc02a1b52805f96b0ed7533755ef81a76f..3c8b5f703910f6ce268ef7af33d18e9d5d3c8990 100644
--- a/openedx/core/djangoapps/credit/tests/test_api.py
+++ b/openedx/core/djangoapps/credit/tests/test_api.py
@@ -702,7 +702,7 @@ class CreditRequirementApiTests(CreditApiTestBase):
         # strip enclosing angle brackets from 'logo_image' cache 'Content-ID'
         image_id = email_image.get('Content-ID', '')[1:-1]
         self.assertIsNotNone(image_id)
-        self.assertIn(image_id, html_content_first.decode('utf-8'))
+        self.assertIn(image_id, html_content_first)
         self.assertIn(
             'credit from Hogwarts School of Witchcraft and Wizardry for',
             html_content_first
@@ -732,7 +732,7 @@ class CreditRequirementApiTests(CreditApiTestBase):
         # logo image is used
         email_payload_second = mail.outbox[1].attachments[0]._payload  # pylint: disable=protected-access
         html_content_second = email_payload_second[0]._payload[1]._payload  # pylint: disable=protected-access
-        self.assertIn(image_id, html_content_second.decode('utf-8'))
+        self.assertIn(image_id, html_content_second)
 
         # The user should remain eligible even if the requirement status is later changed
         api.set_credit_requirement_status(