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

Problem with uploading from file #9

Open
Magrgo opened this issue Sep 24, 2024 · 4 comments
Open

Problem with uploading from file #9

Magrgo opened this issue Sep 24, 2024 · 4 comments

Comments

@Magrgo
Copy link

Magrgo commented Sep 24, 2024

Error message I get with some pictures:
Traceback (most recent call last):
File "C:\Users\MGergo\Desktop\Új mappa\img.py", line 5, in
res = rev_img_searcher.search_by_file('YTES.jpeg')
File "C:\Users\MGergo\Desktop\Új mappa\myenv\lib\site-packages\google_img_source_search\reverse_image_searcher.py", line 65, in search_by_file
return self.__search(self.image_file_uploader, image_path)
File "C:\Users\MGergo\Desktop\Új mappa\myenv\lib\site-packages\google_img_source_search\reverse_image_searcher.py", line 49, in __search
return self.image_source_searcher.search(google_image)
File "C:\Users\MGergo\Desktop\Új mappa\myenv\lib\site-packages\google_img_source_search\image_source_searcher.py", line 39, in search
return self.extract_search_items(src_response.text)
File "C:\Users\MGergo\Desktop\Új mappa\myenv\lib\site-packages\google_img_source_search\image_source_searcher.py", line 17, in extract_search_items
decoded_response = decode(src_response, 'c')
File "C:\Users\MGergo\Desktop\Új mappa\myenv\lib\site-packages\google_img_source_search\batchexecute_decoder.py", line 223, in decode
decoded = _decode_rt_compressed(raw, strict=strict)
File "C:\Users\MGergo\Desktop\Új mappa\myenv\lib\site-packages\google_img_source_search\batchexecute_decoder.py", line 95, in decode_rt_compressed
data = json.loads(envelope[0][2])
File "C:\Users\MGergo\AppData\Local\Programs\Python\Python39\lib\json_init
.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not NoneType

I only get it with some pictures, and when I uploaded these pictures manually, they brought normal results, so its not with those pics.

@Magrgo
Copy link
Author

Magrgo commented Sep 25, 2024

src_response.text:
)]}'

5328
[["wrb.fr","B7fdke","[["18446744073389572699",1,1],[[null,[null,null,null,null,null,null,null,null,[null,null,[["Couldn’t find webpages or duplicate images. Try another one instead.",[["https://www.gstatic.com/lens/cards/assets/image_provenance_failure.png"],"image_provenance_failure"],null,null,null,[173181,null,0,"173181.0",-1,[173181],true],[null,null,null,null,false],null,7],true]]]]],null,null,null,null,[[null,true]],true,null,null,[],["CA0SCggBEgAY/cgKIABaEPafSThnAUr9jCXGsLO2H+1gAGgBcgJIAIIBPgo6CBYQ4AQaEkJvb2tzICYgTGl0ZXJhdHVyZSIaQm9va3MgJiBMaXRlcmF0dXJlL0UtQm9va3Mt34xbPRIAmgECEACiAQA\u003d",null,"EqsCydBo5/LIB9yjmRPZp5kTw6yZE9+smRPkrJkTgO3UFrTE6Bfaoo8Y7Z+yIozxsiK5nLMiqvGzIsODtCLFo7QiraW0IpWptCKhr7Qi+Lm0IrfGtCLd3LQiwd20Irj1tCLL+LQizKa1IsrgtSLY9LUiuf21Iub9tSKdjL0izbTQIpm4ty3igqEv1IuhL+2YoS/MtaIvp7eiL8nGoi/P4aIvovOiL9DRoy/k1KMvwtejL5GEpC+qhaQvyoukL6WZpC/TqaQvlK6kL7G5pC/IyaQvms2kL7XopC/C66Qv5eukL5fzpC+H+aQvjvykL+mapS/PpaUvx7alL6DKpS/GyqUv68ulL/LLpS+Z1aUv2NilL+HgpS/o46Uv6eOlL4TppS/J7aUvzO2lL7X7pS8aNMrZvC7Bod4s27XeLNfpoRfptLwuyoPILtaM0i7EvMwuq97CLvGt3iym4MEurfLPLoaOvi4i3xGXrKsCwZrFB5WyxQfI4MUHy+HFB4bpxQfZ8sUHhZTGB56dxgfrr8YHscLGB9blxgeP58YHjafHB/inxwezzMcH69fHB/38xwfmo8gHv8DIB63HyAf/zsgH5/LIB9WayQefsskHu8LJB5bKyQe41skHrq3KB8zDqBLDxagSy8WoEqzHqBKcyqgS/8qoEtzOqBLe5qgSz++oEtzvqBLW8KgSvPGoEsnxqBL38qgSzfOoEtbzqBK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],[56,"1787526168492307"],[47,"1787525639962459"],[57,"1787526168539737"],[58,"1787526169009176"],[2,"1787526169091776",["18446744073389572699",1,1]],[19,"1787526169091776",["18446744073389572699",1,1]],[8,"1787526169091776"]]]],null,null,null,null,null,null,null,null,null,null,null,"MAE\u003d",null,[[[null,[null,null,[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[null,"No results found","Couldn’t find webpages or duplicate images. Try another one instead.",null,null,null,null,null,8,"image_provenance_failure",null,[4],false]]]]]],true,null,null,[2]]",null,null,null,"generic"]]
58
[["di",567],["af.httprm",566,"-6536575163105555713",29]]
26
[["e",4,null,null,5430]]

@Magrgo
Copy link
Author

Magrgo commented Sep 25, 2024

It happens with basically all images, only 1 or 2 passed

@Magrgo
Copy link
Author

Magrgo commented Sep 25, 2024

Also, these pics work with the original search() with url, but not from file

@Magrgo
Copy link
Author

Magrgo commented Sep 25, 2024

I also noticed that mostly bigger files produce this problem

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

1 participant