Fix TypeError during transcript upload to S3
On a platform that is configured to upload video transcripts to S3 (`DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"`), uploads from the studio fail with a TypeError: "Unicode-objects must be encoded before hashing" A full stacktrace of the issue can be found here: https://sentry.overhang.io/share/issue/2249b6f67d794c7e986cc288758f4ebe/ This error is triggered by md5 hashing in the botocore library, which itself is used by the S3Boto3Storage storage class. This error does not occur with filesystem-based uploads because it does not perform checksum verification. The reason why this error would not occur on edx.org is unknown. Similar issues were already fixed from edxval. To address this issue, we encode the transcript file content prior to sending it to s3.
Showing
- cms/djangoapps/contentstore/views/transcript_settings.py 1 addition, 1 deletioncms/djangoapps/contentstore/views/transcript_settings.py
- cms/djangoapps/contentstore/views/transcripts_ajax.py 2 additions, 2 deletionscms/djangoapps/contentstore/views/transcripts_ajax.py
- common/lib/xmodule/xmodule/video_module/video_handlers.py 1 addition, 1 deletioncommon/lib/xmodule/xmodule/video_module/video_handlers.py
Please register or sign in to comment