Skip to content
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

[Bug Report]: Path too long on Windows (mkdir) #401

Closed
lint-os opened this issue Oct 3, 2024 · 4 comments · Fixed by #402
Closed

[Bug Report]: Path too long on Windows (mkdir) #401

lint-os opened this issue Oct 3, 2024 · 4 comments · Fixed by #402

Comments

@lint-os
Copy link
Contributor

lint-os commented Oct 3, 2024

BlackboardSync Version

#399

BlackboardSync Release

Windows installer

Python Version

No response

Operating System and Version

Windows 11

University Name

Mid-State Technical College

Problem Description

Huh, got a new error from Windows:

Download error
Traceback (most recent call last):
File "pathlib.py", line 1116, in mkdir
FileNotFoundError: [WinError 206] The filename or extension is too long: 'C:\Users\Me\Documents\dl4\2024\Orientation for Courses Using Blackboard Ultra\Resources for Technology Assistance, Time Management, Study Skills, and Motivation (WIP)\Time Management Ideas\10 Time Management Skills and Techniques for Students (article)'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "blackboard_sync\sync.py", line 153, in download
File "blackboard_sync\download.py", line 104, in download
File "blackboard_sync\content\course.py", line 42, in write
File "blackboard_sync\content\content.py", line 67, in write
File "blackboard_sync\content\folder.py", line 29, in write
File "blackboard_sync\content\content.py", line 67, in write
File "blackboard_sync\content\folder.py", line 29, in write
File "blackboard_sync\content\content.py", line 65, in write
File "pathlib.py", line 1121, in mkdir
File "pathlib.py", line 1116, in mkdir
FileNotFoundError: [WinError 206] The filename or extension is too long: 'C:\Users\Me\Documents\dl4\2024\Orientation for Courses Using Blackboard Ultra\Resources for Technology Assistance, Time Management, Study Skills, and Motivation (WIP)\Time Management Ideas\10 Time Management Skills and Techniques for Students (article)'

I tried to fix it with regedit by navigating to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem and edit LongPathsEnabled and set value from 0 to 1, but it didn't work. I tried to set the folder on C:/ but that did not work either.

Log File Contents

Download error
Traceback (most recent call last):
File "pathlib.py", line 1116, in mkdir
FileNotFoundError: [WinError 206] The filename or extension is too long: 'C:\dl\2024\Orientation for Courses Using Blackboard Ultra\Resources for Technology Assistance, Time Management, Study Skills, and Motivation (WIP)\Study Skills\6 Strategies for Effective Learning (borrowed from GPS for Student Success)\ultraDocumentBody'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "blackboard_sync\sync.py", line 153, in download
File "blackboard_sync\download.py", line 104, in download
File "blackboard_sync\content\course.py", line 42, in write
File "blackboard_sync\content\content.py", line 67, in write
File "blackboard_sync\content\folder.py", line 29, in write
File "blackboard_sync\content\content.py", line 67, in write
File "blackboard_sync\content\folder.py", line 29, in write
File "blackboard_sync\content\content.py", line 67, in write
File "blackboard_sync\content\folder.py", line 29, in write
File "blackboard_sync\content\content.py", line 70, in write
File "pathlib.py", line 1121, in mkdir
File "pathlib.py", line 1116, in mkdir
FileNotFoundError: [WinError 206] The filename or extension is too long: 'C:\dl\2024\Orientation for Courses Using Blackboard Ultra\Resources for Technology Assistance, Time Management, Study Skills, and Motivation (WIP)\Study Skills\6 Strategies for Effective Learning (borrowed from GPS for Student Success)\ultraDocumentBody'

@lint-os
Copy link
Contributor Author

lint-os commented Oct 3, 2024

I can confirm that this is not a problem on Linux.

@lint-os
Copy link
Contributor Author

lint-os commented Oct 3, 2024

I see #178 should have fixed it, so it might simply be my machine is configured wrong (even though it should be set). I will be testing on another machine.

@sanjacob
Copy link
Owner

sanjacob commented Oct 3, 2024

@lint-os #178 only fixed the file writer, but tbh I forgot about the mkdir operation. I'll be fixing it soon.

@sanjacob sanjacob changed the title [Bug Report]: Path too long on Windows [Bug Report]: Path too long on Windows (mkdir) Oct 3, 2024
@sanjacob
Copy link
Owner

sanjacob commented Oct 4, 2024

@lint-os should be fixed now. I will be creating a pre-release soon that you can try out.
edit: Pre-release is out

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

Successfully merging a pull request may close this issue.

2 participants