Git Product home page Git Product logo

Comments (21)

Mr-Philo avatar Mr-Philo commented on August 12, 2024 3

Thanks all for sharing this solution!

Until now (2023/02/11), changing info = data[11] to info = data[23] still works for me 👍

from google-images-download.

eamonnkenny avatar eamonnkenny commented on August 12, 2024 3

So, we are at the previous bug again... 3rd time fixing it. This now is a better fix, and would have fixed the code 3 times without having to definte which item gives the correct value of info:

    if info is None:
        # EK
        #info = data[11]
        for item in data:
           if type( item ) == dict:
               info = item

basically what I'm doing is looking at all values of data and seeing which one is the dictionary. When we find it this is what info is set to. It works. And it would have worked for data[22] which occurred about 6 months ago. This then changed to data[23] and now the issue is that info = data[25]. We should just use my new fix. At least if there is one available directory the code can find the value of info itself.

from google-images-download.

eamonnkenny avatar eamonnkenny commented on August 12, 2024 2

Found the fix Joe, turns out that if you change info = data[11] to info = data[22] it will all start working again.

from google-images-download.

DenimPauel avatar DenimPauel commented on August 12, 2024 2

change
from "info = data[9]"
to "info = data[25]"
on line 405 or 407 in google_images_download.py.

or ... How about this?
bb22871
this could search data[xx] maybe in the feature too.

Mar. 23, 2023.

from google-images-download.

Charlweed avatar Charlweed commented on August 12, 2024 1

Future readers, for branch "patch-1" commit e91e6a3, the line to edit is
file: google_images_download/google_images_download.py
method: format_object
line: 407
And works on Google Image Search for Tuesday, December 27, 2022 11:31:19 AM
I changed "info = data[11]" to "info = data[22]" and had success :)

from google-images-download.

DenimPauel avatar DenimPauel commented on August 12, 2024 1

on Jan. 9, 2023
I changed "info = data[11]" to "info = data[23]" and had success.

from google-images-download.

gwonhong avatar gwonhong commented on August 12, 2024 1

January 17, 2023 03:03:44 AM

"info = data[11]" to "info = data[22]"

doesn't work. It worked until last week as I remember.

Error message starts with
'bool' object is not subscriptable

And just read the answer from @DenimPauel
"info = data[11]" to "info = data[23]"
works!
Thanks to @DenimPauel

from google-images-download.

gipinze avatar gipinze commented on August 12, 2024 1

January 17, 2023 03:03:44 AM

"info = data[11]" to "info = data[22]"

doesn't work. It worked until last week as I remember.

Error message starts with 'bool' object is not subscriptable

And just read the answer from @DenimPauel "info = data[11]" to "info = data[23]" works! Thanks to @DenimPauel

Yes, info = data[23] works

16th January 2023

from google-images-download.

trevorgribble avatar trevorgribble commented on August 12, 2024 1

I have

 def format_object(self, object):
        data = object[1]
        main = data[3]
        info = data[25]
        if info is None:
            for item in data:
                if type( item ) == dict:
                    info = item
        formatted_object = {}
...

And sadly I get: Image objects data unpacking failed. Please leave a comment with the above error at ....

Receiving same output, did some digging and it appears the issue is upstream from this format_object function.

Specifically, in the _extract_data_pack function:

def _extract_data_pack(self, page) function, 
           start_line = page.find("AF_initDataCallback({key: \\'ds:1\\'") - 10

is returning -11 (meaning that page.find is returning -1, so we are not finding the desired term. Everything from then on is basically coming up with no data.

So it's seems that the respData returned from:


                req = urllib.request.Request(url, headers=headers)
                resp = urllib.request.urlopen(req)
                respData = str(resp.read())

Has changed quite a bit that the _extract_data_pack function is no longer functional.

from google-images-download.

eamonnkenny avatar eamonnkenny commented on August 12, 2024

the error is arising inside the format_object function because the try except returns an exception which is None. Might be a good idea to not just print(e) but instead do something like print( "Error in format_object:", e )

from google-images-download.

greg-oz avatar greg-oz commented on August 12, 2024

Works for me as well - Thanks

from google-images-download.

websonder avatar websonder commented on August 12, 2024

its stop again, is there any solution so i can run it again?

from google-images-download.

websonder avatar websonder commented on August 12, 2024

Thanks Its working

from google-images-download.

eamonnkenny avatar eamonnkenny commented on August 12, 2024

Is the command line now superslow?
I ran the following and its taking an age to run:

googleimagesdownload -l 10 -r labeled-for-reuse -k pepper -f jpg

from google-images-download.

spacewalkingninja avatar spacewalkingninja commented on August 12, 2024

Works here too! This should be updated to the main git tho :(

from google-images-download.

trevorgribble avatar trevorgribble commented on August 12, 2024

Bumping again today (March 22), anyone else affected?

from google-images-download.

trevorgribble avatar trevorgribble commented on August 12, 2024

@eamonnkenny great call, working smooth again, thank you very much.

from google-images-download.

eamonnkenny avatar eamonnkenny commented on August 12, 2024

from google-images-download.

mrclean789 avatar mrclean789 commented on August 12, 2024

Thank you Eamonn, yes it works now. I'm actually running this again on a new machine and found out I had to install certificates :D

from google-images-download.

websonder avatar websonder commented on August 12, 2024

hi this is my config

Format the object in readable format

def format_object(self, object):
    data = object[1]
    main = data[3]
    info = data[25]
    if info is None:
        info = data[11]
    formatted_object = {}
    try:

i am getting error, could you please help me to solve this
Item no.: 575 --> Item name = Anyk Napja 2023
Evaluating...
-1
Image objects data unpacking failed. Please leave a comment with the above error at #26
Traceback (most recent call last):
File "/home/usethis/script1.py", line 1380, in
main()
File "/home/usethis/script1.py", line 1367, in main
paths, errors = response.download(arguments) # wrapping response in a variable just for consistency
File "/home/usethis/script1.py", line 1007, in download
paths, errors = self.download_executor(arguments)
File "/home/usethis/script1.py", line 1143, in download_executor
images, tabs = self.download_page(url) # download page
TypeError: cannot unpack non-iterable NoneType object

from google-images-download.

rotaugenlaubfrosch avatar rotaugenlaubfrosch commented on August 12, 2024

I have

 def format_object(self, object):
        data = object[1]
        main = data[3]
        info = data[25]
        if info is None:
            for item in data:
                if type( item ) == dict:
                    info = item
        formatted_object = {}
...

And sadly I get:
Image objects data unpacking failed. Please leave a comment with the above error at ....

from google-images-download.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.