This repository was archived by the owner on Aug 1, 2021. It is now read-only.
This repository was archived by the owner on Aug 1, 2021. It is now read-only.
Downloading course aborts due to error "TypeError: 'encoding' is an invalid keyword argument for this function" #541
Closed
Description
Describe the bug
When downloading some courses the udemy-dl.py
utility abandons the download process leaving the downloaded course incomplete.
To Reproduce
Steps to reproduce the behavior:
- udemy course url: [e.g
https://www.udemy.com/machinelearning/
] '...' - Run the following command to reproduce the error.
udemy-dl.py "https://www.udemy.com/course/terraform-fast-track" -k authcookie.txt --skip-sub -q 1080 -o ../downloads/udemy
- See error
Traceback (most recent call last): File "./udemy-dl/udemy-dl.py", line 1453, in <module> main() File "./udemy-dl/udemy-dl.py", line 1108, in main udemy.course_download(skip_captions=options.skip_captions, path=options.output, quality=options.quality, unsafe=options.unsafe) File "./udemy-dl/udemy-dl.py", line 490, in course_download self.download_lectures_only(lecture_best=lecture_best, lecture_title=lecture_title, inner_index=inner_index, lectures_count=lectures_count, lecture_assets=lecture_assets, filepath=filepath, unsafe=unsafe) File "./udemy-dl/udemy-dl.py", line 414, in download_lectures_only self.download_assets(lecture_assets=lecture_assets, filepath=filepath, unsafe=unsafe) File "./udemy-dl/udemy-dl.py", line 327, in download_assets assets.download(filepath=filepath, unsafe=unsafe, quiet=True, callback=self.show_progress) File "/mnt/e/utilities/udemy-dl/udemy/_shared.py", line 126, in download return self._write_external_links(filepath, unsafe) File "/mnt/e/utilities/udemy-dl/udemy/_shared.py", line 92, in _write_external_links file_data = [i.strip().lower() for i in open(filename, encoding='utf-8') if i] TypeError: 'encoding' is an invalid keyword argument for this function
Expected behavior
Expect the application to download the full coarse or the new deltas (changes compared to previously downloaded) successfully
Screenshots
If applicable, add screenshots to help explain your problem.
Python Environment (please complete the following information):
- OS Platform: Ubuntu 18.04.4 LTS running on Windows 10 WSL 2
- Python Version Python 2.7.17 and Python 3.6.9
Additional context
I believe this might be related to #540
Metadata
Metadata
Assignees
Labels
No labels
Activity