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

Issue in Downloading one course #540

Closed syamkrishnap closed 3 years ago

syamkrishnap commented 3 years ago

Hello,

I have been trying to download one course. It's all went well till it reached one chapter. Below is the error I got


Traceback (most recent call last): File "udemy-dl.py", line 1453, in main() File "udemy-dl.py", line 1016, in main udemy.chapter_download(chapter_number=options.chapter, path=options.output, quality=options.quality, skip_captions=options.skip_captions, unsafe=options.unsafe) File "udemy-dl.py", line 664, in chapter_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.py", line 414, in download_lectures_only self.download_assets(lecture_assets=lecture_assets, filepath=filepath, unsafe=unsafe) File "udemy-dl.py", line 327, in download_assets assets.download(filepath=filepath, unsafe=unsafe, quiet=True, callback=self.show_progress) File "udemy-dl/udemy/_shared.py", line 126, in download return self._write_external_links(filepath, unsafe) File "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

damianperera commented 3 years ago

Use python3

r0oth3x49 commented 3 years ago

@syamkrishnap you should use python3 python2 will be removed completely in next version