diff --git a/common/lib/xmodule/xmodule/video_module/video_handlers.py b/common/lib/xmodule/xmodule/video_module/video_handlers.py index 01b7eff45a048eeffa192da39dc749cbb0e1c0e5..386ca422402cb30ff38d8a243e677e36c40e2190 100644 --- a/common/lib/xmodule/xmodule/video_module/video_handlers.py +++ b/common/lib/xmodule/xmodule/video_module/video_handlers.py @@ -534,7 +534,12 @@ class VideoStudioViewHandlers(object): video=self, lang=language, output_format=Transcript.SRT ) response = Response(transcript_content, headerlist=[ - ('Content-Disposition', 'attachment; filename="{}"'.format(transcript_name.encode('utf8'))), + ( + 'Content-Disposition', + 'attachment; filename="{}"'.format( + transcript_name.encode('utf8') if six.PY2 else transcript_name + ) + ), ('Content-Language', language), ('Content-Type', mime_type) ])