Skip to content

[WinError 267] The directory name is invalid #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CodyMoltar opened this issue Nov 28, 2022 · 5 comments
Closed

[WinError 267] The directory name is invalid #26

CodyMoltar opened this issue Nov 28, 2022 · 5 comments

Comments

@CodyMoltar
Copy link

When running the script, it fails with the following error:

Traceback (most recent call last): File "C:\Users\rogie\Desktop\ZOOM-DOWNLOAD\zoom-recording-downloader\zoom-recording-downloader.py", line 291, in <module> main() File "C:\Users\rogie\Desktop\ZOOM-DOWNLOAD\zoom-recording-downloader\zoom-recording-downloader.py", line 267, in main success |= download_recording(download_url, email, filename, foldername) File "C:\Users\rogie\Desktop\ZOOM-DOWNLOAD\zoom-recording-downloader\zoom-recording-downloader.py", line 165, in download_recording os.makedirs(dl_dir, exist_ok=True) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\os.py", line 225, in makedirs mkdir(name, mode) NotADirectoryError: [WinError 267] The directory name is invalid: 'downloads\\Exhibition opening: “Tehno & eko & sistēmas” - 2022.11.26 - 04.08 PM UTC' C:\Users\rogie\Desktop\ZOOM-DOWNLOAD\zoom-recording-downloader>

As you can see I'm running the script on a Windows machine. Not sure where the double '' comes from.

@jcalub-kyna
Copy link

jcalub-kyna commented Jan 10, 2023

Have this issue on my machine. The issue comes from the zoom title with semicolon / special characters that you can't use when creating a new folder in windows

@CodyMoltar
Copy link
Author

Hi, thanks for the reply. I'll try modifying the script to purge any unusable characters!

@jcalub-kyna
Copy link

jcalub-kyna commented Jan 10, 2023

I tried this. Changing the semicolon to space

image

the download is ongoing now

image

@CodyMoltar
Copy link
Author

Cool, thanks! For me it was the " that was the culprit I think. Windows shows this when creating a new folder:
image

@kjarant
Copy link

kjarant commented Mar 21, 2023

changed
def download_recording(download_url, email, filename, foldername):
dl_dir = os.sep.join([os.path.join(DOWNLOAD_DIRECTORY,email), foldername])
for a folder to be created for each user with all the files in that folder. i've got over 2tb to download...
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants