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

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

Open
HerbeMalveillante opened this issue Sep 9, 2020 · 5 comments

Comments

@HerbeMalveillante
Copy link

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.

@nobodyme
Copy link
Owner

nobodyme commented Sep 9, 2020

Okay sure, will take a look at that.

@HerbeMalveillante
Copy link
Author

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

@nobodyme
Copy link
Owner

nobodyme commented Apr 4, 2021

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.

@HerbeMalveillante
Copy link
Author

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

@nobodyme
Copy link
Owner

nobodyme commented Apr 5, 2021

Awesome, cool, thanks.

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

No branches or pull requests

2 participants