pinterest-downloader icon indicating copy to clipboard operation
pinterest-downloader copied to clipboard

TypeError: 'NoneType' object is not iterable

Open msch72 opened this issue 2 years ago • 2 comments

Hi, I tried to download an album. It did not work with a secret album despite the cookie; I just changed it temporarily to public to get the program to work. I was able to download a small test-album.

However, when trying to download a (quite big) album, the script started and after a few hundred images, it stopped with the following error message; perhaps you can make sense out of it?

Traceback (most recent call last): File "C:\Users\Schnell\AppData\Local\Programs\Python\Python37-32\Martin\PinterestDownload\pinterest-downloader.py", line 1826, in run_direct_main() File "C:\Users\Schnell\AppData\Local\Programs\Python\Python37-32\Martin\PinterestDownload\pinterest-downloader.py", line 1822, in run_direct_main , args.https_proxy, args.http_proxy, args.cookies) File "C:\Users\Schnell\AppData\Local\Programs\Python\Python37-32\Martin\PinterestDownload\pinterest-downloader.py", line 1692, in run_library_main , cookies, arg_cut, arg_el, fs_f_max ) File "C:\Users\Schnell\AppData\Local\Programs\Python\Python37-32\Martin\PinterestDownload\pinterest-downloader.py", line 1408, in fetch_imgs images.extend(imgs_round) TypeError: 'NoneType' object is not iterable Abort.

Kind regards, Martin.

msch72 avatar Dec 15 '22 20:12 msch72

Hello, I'm having this problem too and don't know why it happened (I tried again in the next day and it all worked out). What I did to make it work the day I was having trouble with it was replacing: images.extend(imgs_round) with:

try:
    images.extend(imgs_round)
except:
    continue

so it would skip the iteration that caused the script to crash. I know this is not a fix (far from it), but it is enough to download most of the images when something goes wrong and it throws this error.

IHFox avatar Feb 06 '23 21:02 IHFox

Thanks for the report! Please update this issue if anyone can see Failed. Retry after 30 seconds. but able to continue without further error with latest code. Thanks.

limkokhole avatar Mar 23 '23 05:03 limkokhole