dgorissen / coursera-dl

A script for downloading course material (video's, pdfs, quizzes, etc) from coursera.org
http://dirkgorissen.com/2012/09/07/coursera-dl-a-coursera-download-script/
GNU General Public License v3.0
1.73k stars 299 forks source link

exception when trying to create long directories #56

Closed rodch-us closed 10 years ago

rodch-us commented 11 years ago

I am trying new script with modifications for long filenames. I am getting following error with course "writing 2" and the error is as following:

File "courseradownloader.py", line 650, in main() File "courseradownloader_filename.py", line 647, in main d.download_course(cn,dest_dir=args.dest_dir,reverse_sections=args.reverse) File "courseradownloader_filename.py", line 374, in download_course os.makedirs(clsdir) File "E:\Python27\lib\os.py", line 157, in makedirs mkdir(name, mode) WindowsError: [Error 206] The filename or extension is too long: 'c:\Cou\writing -001\07 - Unit 3 Analyzing Rhetorically\07 - Core Analyzing Text [0448] Avail ble as streaming content at httpgo.osu.eduanalyzingtext. Please point your web rowser to that URL or download a text transcript using the icon link at right - '

dgorissen commented 11 years ago

Mmm, yeah I feared that would come up at some point. There is no trivial fix here as you need to do a little looking ahead to avoid having things that belong together end up in different directories. I will try to fix this as soon as I find some time.


Web / Blog : http://dirkgorissen.com Twitter : https://twitter.com/elazungu

On Mon, Jun 17, 2013 at 4:33 PM, rodch-us notifications@github.com wrote:

I am trying new script with modifications for long filenames. I am getting following error with course "writing 2" and the error is as following:

File "courseradownloader.py", line 650, in main() File "courseradownloader_filename.py", line 647, in main d.download_course(cn,dest_dir=args.dest_dir,reverse_sections=args.reverse) File "courseradownloader_filename.py", line 374, in download_course os.makedirs(clsdir) File "E:\Python27\lib\os.py", line 157, in makedirs mkdir(name, mode) WindowsError: [Error 206] The filename or extension is too long: 'c:\Cou\writing -001\07 - Unit 3 Analyzing Rhetorically\07 - Core Analyzing Text [0448] Avail ble as streaming content at httpgo.osu.eduanalyzingtext. Please point your web rowser to that URL or download a text transcript using the icon link at right - '

— Reply to this email directly or view it on GitHubhttps://github.com/dgorissen/coursera-dl/issues/56 .

dgorissen commented 10 years ago

Can you have another try with the current master. You may still have a similar error so please past the full output. Unfortunately I cannot try myself as the writing2 course has ended.