diff --git a/common/lib/xmodule/xmodule/tests/test_video.py b/common/lib/xmodule/xmodule/tests/test_video.py
index 261d1c526a..575173ccb0 100644
--- a/common/lib/xmodule/xmodule/tests/test_video.py
+++ b/common/lib/xmodule/xmodule/tests/test_video.py
@@ -826,7 +826,7 @@ class VideoExportTestCase(VideoBlockTestBase):
"""
self.descriptor.transcripts = None
xml = self.descriptor.definition_to_xml(self.file_system)
- expected = '\n'
+ expected = b'\n'
self.assertEquals(expected, etree.tostring(xml, pretty_print=True))
@patch('xmodule.video_module.video_module.edxval_api', None)
diff --git a/common/lib/xmodule/xmodule/video_module/transcripts_utils.py b/common/lib/xmodule/xmodule/video_module/transcripts_utils.py
index 87b11c953b..addf73a08f 100644
--- a/common/lib/xmodule/xmodule/video_module/transcripts_utils.py
+++ b/common/lib/xmodule/xmodule/video_module/transcripts_utils.py
@@ -185,7 +185,7 @@ def get_transcripts_from_youtube(youtube_id, settings, i18n, youtube_transcript_
raise GetTranscriptsFromYouTubeException(msg)
sub_starts, sub_ends, sub_texts = [], [], []
- xmltree = etree.fromstring(data.content.encode('utf-8'), parser=utf8_parser)
+ xmltree = etree.fromstring(data.content, parser=utf8_parser)
for element in xmltree:
if element.tag == "text":
start = float(element.get("start"))
@@ -812,11 +812,11 @@ class VideoTranscriptsMixin(object):
log.debug("No subtitles for 'en' language")
raise ValueError
- data = Transcript.asset(self.location, transcript_name, lang).data
+ data = Transcript.asset(self.location, transcript_name, lang).data.decode('utf-8')
filename = u'{}.{}'.format(transcript_name, transcript_format)
content = Transcript.convert(data, 'sjson', transcript_format)
else:
- data = Transcript.asset(self.location, None, None, other_lang[lang]).data
+ data = Transcript.asset(self.location, None, None, other_lang[lang]).data.decode('utf-8')
filename = u'{}.{}'.format(os.path.splitext(other_lang[lang])[0], transcript_format)
content = Transcript.convert(data, 'srt', transcript_format)
diff --git a/common/lib/xmodule/xmodule/video_module/video_module.py b/common/lib/xmodule/xmodule/video_module/video_module.py
index 01d5a77072..6943633793 100644
--- a/common/lib/xmodule/xmodule/video_module/video_module.py
+++ b/common/lib/xmodule/xmodule/video_module/video_module.py
@@ -481,7 +481,7 @@ class VideoBlock(
'There is no transcript file associated with the {lang} language.',
'There are no transcript files associated with the {lang} languages.',
len(no_transcript_lang)
- ).format(lang=', '.join(no_transcript_lang))
+ ).format(lang=', '.join(sorted(no_transcript_lang)))
)
)
return validation