r0oth3x49 / acloud-dl

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

How to solve this #117

Closed MistFenix closed 8 months ago

MistFenix commented 11 months ago

I was downloading and it shows me: Traceback (most recent call last): File "C:\Users\Apollo\Desktop\A Cloud Guru\acloud-dl\acloud-dl.py", line 446, in main() File "C:\Users\Apollo\Desktop\A Cloud Guru\acloud-dl\acloud-dl.py", line 434, in main cloud_guru.course_download(path=options.output, quality=options.quality, File "C:\Users\Apollo\Desktop\A Cloud Guru\acloud-dl\acloud-dl.py", line 333, in course_download self.download_lectures_only(lecture_best=lecture_best, lecture_title=lecture_title, File "C:\Users\Apollo\Desktop\A Cloud Guru\acloud-dl\acloud-dl.py", line 215, in download_lectures_only self.download_assets(lecture_assets=lecture_assets, filepath=filepath) File "C:\Users\Apollo\Desktop\A Cloud Guru\acloud-dl\acloud-dl.py", line 156, in download_assets assets.download(filepath=filepath, quiet=True, callback=self.show_progress) File "C:\Users\Apollo\Desktop\A Cloud Guru\acloud-dl\acloud_shared.py", line 857, in download return self._write_external_links(filepath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Apollo\Desktop\A Cloud Guru\acloud-dl\acloud_shared.py", line 773, in _write_external_links with open("{}".format(filename), "a", encoding="utf-8") as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: [Errno 22] Invalid argument: '\\?\\\?\C:\Users\Apollo\Desktop\A Cloud Guru\acloud-dl\AWS Certified Solutions Architect - Associate (SAA-C03)\04 Simple Storage Service (S3)\009 For Amazon S3 request rates whats the difference between prefixes and nested folders How many prefixes can I have in an S3 bucket.txt'

MistFenix commented 11 months ago

def _write_external_links(self, filepath): retVal = {} filename = re.sub('[^A-Za-z0-9]+', '', filepath) if os.name == "nt":

If the absolute path to the file is too long, append the 'magic' prefix

    if len(os.path.abspath(filename)) > 255:
        filename = u"\\\\?\\%s" % (os.path.abspath(filename))
MistFenix commented 11 months ago

Didn't help

Anon-Exploiter commented 11 months ago

Some issue with the file path, try running it in a parent directory, D:\ or in WSL linux.

tonysepia commented 8 months ago

This commit solves this: https://github.com/r0oth3x49/acloud-dl/pull/120