r0oth3x49 / acloud-dl

A cross-platform python based utility to download courses from acloud.guru for personal offline use.
MIT License
350 stars 141 forks source link

OSError: [Errno 22] Invalid argument #72

Closed githubroom closed 3 years ago

githubroom commented 3 years ago

Download fail ast some point with following error.

[] : Lecture(s) : (6 of 8) [] : Downloading (006 Refresh on Data Lake Gen 2) [*] : Lecture : '006 Refresh on Data Lake Gen 2' (already downloaded). Traceback (most recent call last): File ".\acloud-dl.py", line 332, in main() File ".\acloud-dl.py", line 325, in main acloud.course_download(path=options.output, quality=options.quality, download_all=options.download_all) File ".\acloud-dl.py", line 241, in course_download self.download_lectures_only(lecture_best=lecture_best, lecture_title=lecture_title, inner_index=lecture_index, lectures_count=lectures_count, lecture_assets=lecture_assets, lecture_subs=lecture_subs, filepath=filepath) File ".\acloud-dl.py", line 176, in download_lectures_only self.download_assets(lecture_assets=lecture_assets, filepath=filepath) File ".\acloud-dl.py", line 135, in download_assets assets.download(filepath=filepath, quiet=True, callback=self.show_progress) File "C:\Users\tomas\Downloads\acloudguru\acloud-dl\acloud_shared.py", line 853, in download return self._write_external_links(filepath) File "C:\Users\tomas\Downloads\acloudguru\acloud-dl\acloud_shared.py", line 769, in _write_external_links with open("{}".format(filename), "a", encoding="utf-8") as f: OSError: [Errno 22] Invalid argument: '\\?\\\?\C:\Users\tomas\Downloads\acloudguru\acloud-dl\Microsoft Azure Exam DP-201 - Designing an Azure Data Solution\03 Design Non-Relational Cloud Data Stores\006 Orchestrate data movement and transformation in Azure Data Factory or Azure Synapse Pipeline.txt'

tripperaf commented 3 years ago

Same issue faced

ssingh1283 commented 3 years ago

faced this issue, started working after adding - [0:50] after filepath

         if mediatype == "external_link":
                assets.download(filepath=filepath[0:50], quiet=True, callback=self.show_progress)