reddit-fetch icon indicating copy to clipboard operation
reddit-fetch copied to clipboard

Error is occuring when downloading many images, and changing pages.

Open HerbeMalveillante opened this issue 3 years ago • 5 comments

starting download 12 Connecting to r/aesthetic Traceback (most recent call last): File "grab_pictures.py", line 108, in <module> main() File "grab_pictures.py", line 83, in main url = url + '&after=' + after TypeError: can only concatenate str (not "NoneType") to str

The error happens when trying to download another series of 100 pictures. I tried with different subs. The error happens always after the same amount of downloaded pictures, so I assume only one image is causing the problems.

HerbeMalveillante avatar Sep 09 '20 13:09 HerbeMalveillante

Okay sure, will take a look at that.

nobodyme avatar Sep 09 '20 13:09 nobodyme

I think I fixed the error for now by adding if after != '' and after != None: url = url + '&after=' + after

But now, the program seems to stop downloading images after a certain amount (830 images for r/aesthetic each time I try. I'm currently running tests with another sub to see if the number is the same or / and if the problem is recurring. The problem seems to happen after a big amount of image btw

HerbeMalveillante avatar Sep 09 '20 14:09 HerbeMalveillante

Hey, @HerbeMalveillante appreciate your work on this, were you able to find the root cause of the issue? Was it because r/aesthetic had only 830 images then? Now I have some time to work on this, so would be able to fix from where you left off. Thanks.

nobodyme avatar Apr 04 '21 21:04 nobodyme

Hey, @HerbeMalveillante appreciate your work on this, were you able to find the root cause of the issue? Was it because r/aesthetic had only 830 images then? Now I have some time to work on this, so would be able to fix from where you left off. Thanks.

Hey ! I have not used the library for a while, but the sub definitely have more than 830 images on it. I will try to use it again in some time (I'm using it to generate datasets for machine learning) and come back to you after

HerbeMalveillante avatar Apr 04 '21 22:04 HerbeMalveillante

Awesome, cool, thanks.

nobodyme avatar Apr 05 '21 00:04 nobodyme