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

[I solved it by changing your code] Error of TypeError: 'NoneType' object is not subscriptable #39

Open
mikelmh025 opened this issue Apr 13, 2023 · 4 comments

Comments

@mikelmh025
Copy link

Under file google_images_download.py, class googleimagesdownload, function format_object line 405.

The original code is trying to get info from object from data[9] or data[11]. Looks like some changes made from google. You should use info = data[25] instead.

janvdp added a commit to janvdp/google-images-download that referenced this issue Apr 24, 2023
@janvdp
Copy link

janvdp commented Apr 24, 2023

I've added your fix: https://github.com/janvdp/google-images-download

The PR to this branch is still open.

Thanks!

@rotaugenlaubfrosch
Copy link

What a genius! Thanks

@moisty70
Copy link

Again the 'NoneType' object is not subscriptable ERROR.

Traceback (most recent call last):
File "/usr/local/bin/googleimagesdownload", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/google_images_download/google_image
paths, errors = response.download(arguments) # wrapping response in a variabl
File "/usr/local/lib/python3.9/site-packages/google_images_download/google_image
paths, errors = self.download_executor(arguments)
File "/usr/local/lib/python3.9/site-packages/google_images_download/google_image
items, errorCount, abs_path = self.get_all_items(images, main_directory, dir
File "/usr/local/lib/python3.9/site-packages/google_images_download/google_image
object['image_link'], object['image_format'], main_directory, dir_name, count,
TypeError: 'NoneType' object is not subscriptable

@dingusagar
Copy link

Thanks a lot for this fix @mikelmh025 and @janvdp. This helped. Wondering why these fixes are not getting merged into the original repo.

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

5 participants