coursera-dl / edx-dl

A simple tool to download video lectures from edx.org (and other openedx sites)
GNU Lesser General Public License v3.0
1.93k stars 640 forks source link

NoneType error downloading edx subtitles #610

Open JohnVeness opened 4 years ago

JohnVeness commented 4 years ago

🚨Please review the Troubleshooting section before reporting any issue. Don't forget also to check the current issues to avoid duplicates.

Subject of the issue

Downloading certain subtitles fails with TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Your environment

Steps to reproduce

  1. edx-dl -s -u <censored> https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/course/ --filter-section 8
  2. Wait for it to download the English subtitles for video 22.

Expected behaviour

All videos and subtitles download OK.

Actual behaviour

English subtitles for video 22 do not download and the code crashes. Output:

edx_dl version 0.1.13
Building initial headers for future requests.
Getting initial CSRF token.
Found CSRF token.
Logging into Open edX site: https://courses.edx.org/login_ajax
Extracting course information from dashboard.
Filtering sections
Sections filtered to: 8
Downloading Circuits and Electronics 1: Basic Circuit Analysis [course-v1:MITx+6.002.1x+2T2019/co]
Downloading 1 section(s)
Section  8: Week 4
  Incremental Analysis
  Dependent Sources and Amplifiers
  Week 4 Tutorials
  Homework 4
  Lab 4
Extracting all units information in parallel.
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Incremental_Analysis'
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Dependent_Sources_and_Amplifiers'
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@e8a196487e0a49cb8c900863f09cfc69'
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Homework_4'
Processing 'https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/jump_to/block-v1:MITx+6.002.1x+2T2019+type@sequential+block@Lab_4'
Removed 62 duplicated urls from 179 in total
Output directory: Downloaded
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V010900_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/01-MIT6002XT214-V010900_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V1_Review/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/01-MIT6002XT214-V010900_DTH.en.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V1_Review/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/01-MIT6002XT214-V010900_DTH.zh.srt
[download] https://courses.edx.org/assets/courseware/v1/dfb08882928ba6c71f338cdd20fc0d99/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L7-oei12-gaps.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/01-handouts_6002-L7-oei12-gaps.pdf
[download] https://courses.edx.org/assets/courseware/v1/22713ea724e9bf94ab586bf93153ce7d/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L7-oei12-gaps-annotated.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/01-handouts_6002-L7-oei12-gaps-annotated.pdf
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V011000_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/02-MIT6002XT214-V011000_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V2_Intro_-_Setup_for_Demo_Curve_Plotting_Animation/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/02-MIT6002XT214-V011000_DTH.en.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V2_Intro_-_Setup_for_Demo_Curve_Plotting_Animation/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/02-MIT6002XT214-V011000_DTH.zh.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V011100_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/03-MIT6002XT214-V011100_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V3_DEMO_-_Music_Over_a_Light_Beam_Distorted_Sinusoid_and_Music/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/03-MIT6002XT214-V011100_DTH.en.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V3_DEMO_-_Music_Over_a_Light_Beam_Distorted_Sinusoid_and_Music/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/03-MIT6002XT214-V011100_DTH.zh.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V011200_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/04-MIT6002XT214-V011200_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V4_Incremental_Method_Insight/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/04-MIT6002XT214-V011200_DTH.en.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V4_Incremental_Method_Insight/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/04-MIT6002XT214-V011200_DTH.zh.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V011300_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/05-MIT6002XT214-V011300_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V5_Incremental_Method_Insight/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/05-MIT6002XT214-V011300_DTH.en.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V5_Incremental_Method_Insight/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/05-MIT6002XT214-V011300_DTH.zh.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V011400_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/06-MIT6002XT214-V011400_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V6_DEMO_-_Music_Over_a_Light_Beam_Distortion_and_No_Distortion/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/06-MIT6002XT214-V011400_DTH.en.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V6_DEMO_-_Music_Over_a_Light_Beam_Distortion_and_No_Distortion/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/06-MIT6002XT214-V011400_DTH.zh.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V011500_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/07-MIT6002XT214-V011500_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V7_Mathematical_Meaning/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/07-MIT6002XT214-V011500_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V7_Mathematical_Meaning/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/07-MIT6002XT214-V011500_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V011600_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/08-MIT6002XT214-V011600_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V8_Mathematical_Meaning/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/08-MIT6002XT214-V011600_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V8_Mathematical_Meaning/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/08-MIT6002XT214-V011600_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V011700_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/09-MIT6002XT214-V011700_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V9_Mathematical_Meaning/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/09-MIT6002XT214-V011700_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V9_Mathematical_Meaning/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/09-MIT6002XT214-V011700_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V011800_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/10-MIT6002XT214-V011800_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V10_Graphical_Meaning/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/10-MIT6002XT214-V011800_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V10_Graphical_Meaning/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/10-MIT6002XT214-V011800_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V011900_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/11-MIT6002XT214-V011900_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V11_Circuit_Model/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/11-MIT6002XT214-V011900_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V11_Circuit_Model/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/11-MIT6002XT214-V011900_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V012000_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/12-MIT6002XT214-V012000_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V12_Circuit_Model/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/12-MIT6002XT214-V012000_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V12_Circuit_Model/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/12-MIT6002XT214-V012000_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V012100_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/13-MIT6002XT214-V012100_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V13_Small_Signal_Circuit_Elements/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/13-MIT6002XT214-V012100_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V13_Small_Signal_Circuit_Elements/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/13-MIT6002XT214-V012100_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V012200_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/14-MIT6002XT214-V012200_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V14_Small_Signal_Circuit_Elements/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/14-MIT6002XT214-V012200_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V14_Small_Signal_Circuit_Elements/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/14-MIT6002XT214-V012200_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V012300_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/15-MIT6002XT214-V012300_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V15_Small_Signal_Circuit_Solution_Example/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/15-MIT6002XT214-V012300_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V15_Small_Signal_Circuit_Solution_Example/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/15-MIT6002XT214-V012300_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V012400_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/16-MIT6002XT214-V012400_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V16_Small_Signal_Circuit_Solution_Example/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/16-MIT6002XT214-V012400_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S7V16_Small_Signal_Circuit_Solution_Example/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/16-MIT6002XT214-V012400_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V012500_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/17-MIT6002XT214-V012500_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V1_Review/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/17-MIT6002XT214-V012500_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V1_Review/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/17-MIT6002XT214-V012500_DTH.en.srt
[download] https://courses.edx.org/assets/courseware/v1/d3449750134f242dd481ecb840d02c33/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L8-oei12-gaps.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/17-handouts_6002-L8-oei12-gaps.pdf
[download] https://courses.edx.org/assets/courseware/v1/021a02dbb7de144e38885a574b935815/asset-v1:MITx+6.002.1x+2T2019+type@asset+block/handouts_6002-L8-oei12-gaps-annotated.pdf => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/17-handouts_6002-L8-oei12-gaps-annotated.pdf
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V012600_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/18-MIT6002XT214-V012600_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V2_Intro_to_Dependent_Sources/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/18-MIT6002XT214-V012600_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V2_Intro_to_Dependent_Sources/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/18-MIT6002XT214-V012600_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V012700_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/19-MIT6002XT214-V012700_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V3_Example_Dependent_Source_Circuit/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/19-MIT6002XT214-V012700_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V3_Example_Dependent_Source_Circuit/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/19-MIT6002XT214-V012700_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V012800_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/20-MIT6002XT214-V012800_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V4_Various_Types_of_Dependent_Sources/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/20-MIT6002XT214-V012800_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V4_Various_Types_of_Dependent_Sources/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/20-MIT6002XT214-V012800_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V012900_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/21-MIT6002XT214-V012900_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V5_Another_Dependent_Source_Example/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/21-MIT6002XT214-V012900_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V5_Another_Dependent_Source_Example/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/21-MIT6002XT214-V012900_DTH.en.srt
[download] https://edx-video.net/mit-6002x/MIT6002XT214-V013000_DTH.mp4 => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/22-MIT6002XT214-V013000_DTH.mp4
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V6_Another_Dependent_Source_Example/handler/transcript/translation/zh => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/22-MIT6002XT214-V013000_DTH.zh.srt
[download] https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V6_Another_Dependent_Source_Example/handler/transcript/translation/en => Downloaded/Circuits_and_Electronics_1-_Basic_Circuit_Analysis/08-Week_4/22-MIT6002XT214-V013000_DTH.en.srt
Traceback (most recent call last):
  File "/home/john/.local/bin/edx-dl", line 8, in <module>
    sys.exit(main())
  File "/home/john/.local/lib/python3.8/site-packages/edx_dl/edx_dl.py", line 1073, in main
    download(args, selections, filtered_units, headers)
  File "/home/john/.local/lib/python3.8/site-packages/edx_dl/edx_dl.py", line 849, in download
    download_unit(unit, args, target_dir, filename_prefix,
  File "/home/john/.local/lib/python3.8/site-packages/edx_dl/edx_dl.py", line 811, in download_unit
    download_video(unit.videos[0], args, target_dir, filename_prefix,
  File "/home/john/.local/lib/python3.8/site-packages/edx_dl/edx_dl.py", line 802, in download_video
    skip_or_download(sub_downloads, headers, args, download_subtitle)
  File "/home/john/.local/lib/python3.8/site-packages/edx_dl/edx_dl.py", line 781, in skip_or_download
    f(url, filename, headers, args)
  File "/home/john/.local/lib/python3.8/site-packages/edx_dl/edx_dl.py", line 761, in download_subtitle
    subs_string = edx_get_subtitle(url, headers)
  File "/home/john/.local/lib/python3.8/site-packages/edx_dl/edx_dl.py", line 204, in edx_get_subtitle
    return edx_json2srt(json_object)
  File "/home/john/.local/lib/python3.8/site-packages/edx_dl/parsing.py", line 44, in edx_json2srt
    output.append(t + "\n\n")
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

More info

Downloading the problematic json file https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V6_Another_Dependent_Source_Example/handler/transcript/translation/en I notice that there are entries in the "text" section that use "null" (without quotes), where other json files, such as https://courses.edx.org/courses/course-v1:MITx+6.002.1x+2T2019/xblock/block-v1:MITx+6.002.1x+2T2019+type@video+block@S8V5_Another_Dependent_Source_Example/handler/transcript/translation/en use the literal text "None". I expect your json parser is not expecting the nulls.

I am no python expert so I don't know if this is the best fix, but changing the following line in parsing.py, in edx_json2srt from: if t == '':

to if t == '' or t is None:

seems to fix this for this problematic json file at least.

Observation

I notice that the edx.org server itself can generate these .srt files on the fly, as they are downloadable by a user of the website. Their parser copes with nulls in their json and presumably any other quirks there might be. Maybe you could GET or POST to the correct URLs to let their server generate the .srt file rather than you interpreting the json yourself?