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

TypeError: 'NoneType' object is not iterable #19

Open
msch72 opened this issue Dec 15, 2022 · 2 comments
Open

TypeError: 'NoneType' object is not iterable #19

msch72 opened this issue Dec 15, 2022 · 2 comments

Comments

@msch72
Copy link

msch72 commented Dec 15, 2022

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.

@IHFox
Copy link

IHFox commented Feb 6, 2023

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.

limkokhole added a commit that referenced this issue Mar 23, 2023
limkokhole added a commit that referenced this issue Mar 23, 2023
@limkokhole
Copy link
Owner

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.

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

3 participants