r0oth3x49 / udemy-dl

A cross-platform python based utility to download courses from udemy for personal offline use.
MIT License
4.83k stars 1.19k forks source link

Download failure - AttributeError: 'NoneType' object has no attribute 'get_quality' #556

Closed EnoqueEsteves closed 3 years ago

EnoqueEsteves commented 3 years ago

Describe the bug When trying to download a course from Udemy it fails. This occurs on previously downloaded courses as well as if you clear the previously downloaded course and try to download it from scratch again.

To Reproduce

  1. Run the download (see additional context).
  2. Error occurs
    Traceback (most recent call last):
      File "./udemy-dl/udemy-dl.py", line 607, in <module>
        main()
      File "./udemy-dl/udemy-dl.py", line 591, in main
        skip_hls_stream=args.skip_hls_stream,
      File "./udemy-dl/udemy-dl.py", line 354, in course_download
        quality,
      File "./udemy-dl/udemy-dl.py", line 81, in download_lecture
        lecture = lecture.get_quality(quality)
    AttributeError: 'NoneType' object has no attribute 'get_quality'

Expected behavior Download course video and/or assets correctly with out errors

Screenshots Example error out put to screen image

Python Environment (please complete the following information):

Additional context

Tried running it in the following combinations

./udemy-dl/udemy-dl.py "$i" -k ./udemy_authcookie.txt --skip-sub -q 1080 -o ../Manuals/udemy 
./udemy-dl/udemy-dl.py "$i" -k ./udemy_authcookie.txt --skip-sub -q 1080 -o ../Manuals/udemy --skip-assets
./udemy-dl/udemy-dl.py "$i" -k ./udemy_authcookie.txt --skip-sub -q 1080 -o ../Manuals/udemy --skip-assets --skip-hls

"$i" can be replaced with the following course url's which I have tried and fail.

EnoqueEsteves commented 3 years ago

What was the cause?

r0oth3x49 commented 3 years ago

the lecture type was not video which cause the issue