reddit-fetch
reddit-fetch copied to clipboard
Error is occuring when downloading many images, and changing pages.
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.
Okay sure, will take a look at that.
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
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, @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
Awesome, cool, thanks.