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

Download halts on Windows #63

Closed lsoliveira459 closed 10 years ago

lsoliveira459 commented 11 years ago

The download stops arbitrarily on Windows. The first time it happened it had just finished downloading a course content and should start downloading the next course. The second time it was downloading course's class and wouldn't start the next one. Third time was the same as second.

The first time I restarted the program but I noticed a simple crtl-c (SIGINT) would make the program continue.

This is really bad specially for those who want to let it downloading through the night.

PS: I'm using pip's version of coursera-dl (v1.4.10).

dgorissen commented 11 years ago

mmm I have had no such issues here. Are you sure it is not a flaky network connection?


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

On Sat, Jul 20, 2013 at 7:13 PM, Lucas Oliveira notifications@github.comwrote:

The download stops arbitrarily on Windows. The first time it happened it had just finished downloading a course content and should start downloading the next course. The second time it was downloading course's class and wouldn't start the next one. Third time was the same as second.

The first time I restarted the program but I noticed a simple crtl-c (SIGINT) would make the program continue.

This is really bad specially for those who want to let it downloading through the night.

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

lsoliveira459 commented 11 years ago

Define flaky. My network has a steady connection, even though it's slow (~400 kbps = 50 KBps). Something I forgot to mention though: I'm under Windows 8 (Pro, but this shouldn't make a difference)... I'm not downloading anything else in this network nor am doing any heavy computation on this PC.

Here's a screenshot, for the unbelivers. untitled

This problem happened already about 10 times in a period of 3 or 4 days. On this specific time (the one on the screenshot) and a few others, I had to ctrl-alt-del the program or it wouldn't download again. As I said before, the behavior is a little bit arbitrary/random.

During the night though, the program seems to not halt. Or else, it somehow recovers by itself. I'm not sure if any of those things make sense.

I can think of a few possibilities:

  1. My Windows is screwed
  2. Windows 8 changed whatever network library Python is using
  3. Coursera is timeouting my connection
  4. The program has some very well-hidden bug

I don't believe that neither my Windows is screwed nor Coursera is timeouting my connection. If so, I'd be having a lot more problems. That leaves us with a problem between Python and Windows or in coursera-dl. I remember Python behaves differently on Linux/Unix and Windows, specially regarding files/streams, so it might be a combination of the two.

I'll try to work on this next week too, after finals.

lsoliveira459 commented 10 years ago

Well... Analyzing the code, the only strange thing I found was inside mechanize. I'm changing it for Requests to see if this problem goes away.

dgorissen commented 10 years ago

Cool, thanks. Let me know if you find something. I have not had any issues myself or had anybody else report any.


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

On Fri, Aug 2, 2013 at 2:47 PM, Lucas Oliveira notifications@github.comwrote:

Well... Analyzing the code, the only strange thing I found was inside mechanize. I'm changing it for Requests to see if this problem goes away.

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

lsoliveira459 commented 10 years ago

Have you considered multithreading (in python's case Multiprocessing)? One process to populate a list of urls and another to download. And how about an update feature, where the user would only say --update and the program would id. the classes and download the new files.

Where do I propose those features?

dgorissen commented 10 years ago

Yes on both counts, would be great features to have. Unfortunately though currently out of my time-budget. Feel free to create github issues for both so the can be tracked. But I will be unable to get to them in the near term. Happy to merge patches though :)


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

On Fri, Aug 9, 2013 at 4:50 PM, Lucas Oliveira notifications@github.comwrote:

Have you considered multithreading (in python's case Multiprocessing)? One process to populate a list of urls and another to download. And how about an update feature, where the user would only say --update and the program would id. the classes and download the new files.

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