Thanks a bunch for these videos @Jie Jenn! They were just what I needed to get me started on my Pi photo display. There were a few typo's/bugs in the source that I had to sort out, but ultimately it made me understand what was going on even more. Now I understand the Google API for photos and even some about Pandas. You rock!
Create_Service had saved me a ton of time. Thank you! Just don't forget to set static_discovery=False in build() since Google had changed their API up a bit
Wow. Thank you so much Jie Jenn. Really wonderful introduction and demonstration for the photos api usage in python. Much appreciated. You have done a great service to the community with your teaching. As mentioned by @miroslav novak in his comment... Need to change the Google.py to include the following extra argument. Otherwise it will not work. That is add static_discover=False Correction, to work with the new version of google-api-python-client, it was necessary to pass an extra argument to the build function: service = build(api_name, api_version, credentials=cred,static_discovery=False)
Hi, when i tried to run " init_photo_service.py", I keep getting the error "Traceback (most recent call last): File "C:/imgur2-master/google photo ini.py", line 2, in from Google import Create_Service ModuleNotFoundError: No module named 'Google'"
Hello Jie Jenn, Thanks for sharing this information about the Google Photos API, question, with this is it possible to manage my users' google photos storage in a Google workspace?
whenever I try to run the first stage of the code,it throws me these two errors - No name 'auth' in module google pylint(no name in module) unable to import google.auth.transport.requests pylint(import error) I'm having these troubles in google.py file and I'm using visual studio code.
Have you installed Google Client library? To install Google Client library pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
@@chupehuweustaad6742 I've found the fix here: you have to install two libraries with "pip install google-auth" and "pip install requests": stackoverflow.com/questions/51006382/no-module-named-requests-when-trying-to-use-google-oauth2-with-docker
Correction, to work with the new version of google-api-python-client, it was necessary to pass an extra argument to the build function: service = build(api_name, api_version, credentials=cred,static_discovery=False)
Dear Sir i want to search object by google lens in google photo lens library. I have 4000 png images of different things. I want to use google lens camera to take a picture of an object and search in my images library. like object detection in images projects. but in my images the object shape, size and location are different in images. Google lens detects well by taking a picture of something to find the object. but it searches from google and i want that google lens search only in my images library. I can't do that. please if you can help do that, thanks
I just tested the script, and it is working fine for me. snipboard.io/ENqC8T.jpg Makes sure there are no typos in your code. CLIENT_SECRET_FILE = '' API_NAME = 'photoslibrary' API_VERSION = 'v1' SCOPES = ['www.googleapis.com/auth/photoslibrary', 'www.googleapis.com/auth/photoslibrary.sharing'] service = Create_Service(CLIENT_SECRET_FILE, API_NAME, API_VERSION, SCOPES)
I also have this same issue along with a few more people. we have the problem on both Windows and Linux. However on 1 Linux machine, it works fine. same exact code on all. no solution yet.
Thank you for your video. When I follow your steps, I obtain this error in "French" [WinError 10013] Une tentative d’accès à un socket de manière interdite par ses autorisations d’accès a été tentée
I need automatically upload videos from DVR camera. Camera after drive sending video to Raspberry Pi. I need upload all video from folder to my Google Photos on select album. How make it?
Anyone know how to resolve this line in php api?: $authCredentials = new UserRefreshCredentials( /* Add your scope, client secret and refresh token here */ );
Traceback (most recent call last): File "c:\Programming\Python\GooglePhotos\Scripts\init_GooglePhotos_service.py", line 2, in from Google import Create_Service ModuleNotFoundError: No module named 'Google' Code: import os from Google import Create_Service API_NAME = 'MyGooglePhotosApp' API_VERSION = 'v1' CLIENT_SECRET_FILE = 'Client_Secret_MyGooglePhotosApp.json' SCOPES = ['www.googleapis.com/auth/photoslibrary', 'www.googleapis.com/auth/photoslibrary.sharing'] service = Create_Service(CLIENT_SECRET_FILE,API_NAME, API_VERSION, SCOPES) (GooglePhotos) PS C:\Programming\python\GooglePhotos\scripts> pip show Google Name: google Version: 3.0.0 Summary: Python bindings to the Google search engine. Home-page: breakingcode.wordpress.com/ Author: Mario Vilas Author-email: mvilas@gmail.com License: UNKNOWN Location: c:\programming\python\googlephotos\lib\site-packages Requires: beautifulsoup4 Required-by: I feel like I'm missing something obvious but I'm not seeing it. Does it matter that the Google package says it's for Google search engine and not referencing Photos? Any help would be greatly appreciated.
1. Google.py module (case sensitive) is an utility I wrote to simplify Google API service creation. You can get the source code here learndataanalysis.org/google-py-file-source-code/ 2. API_NAME should be the Google API service name not the app name, so change the API_NAME variable to API_NAME = 'photoslibrary'. Once you fix 1 and 2, your script should work fine.
Thanks a bunch for these videos @Jie Jenn! They were just what I needed to get me started on my Pi photo display. There were a few typo's/bugs in the source that I had to sort out, but ultimately it made me understand what was going on even more. Now I understand the Google API for photos and even some about Pandas. You rock!
Good luck with your project.
Create_Service had saved me a ton of time. Thank you! Just don't forget to set static_discovery=False in build() since Google had changed their API up a bit
Thanks for the reminder.
I was almost two days looking for where the error was and you saved me, thank you very much!
Wow. Thank you so much Jie Jenn. Really wonderful introduction and demonstration for the photos api usage in python.
Much appreciated. You have done a great service to the community with your teaching.
As mentioned by @miroslav novak in his comment... Need to change the Google.py to include the following extra argument. Otherwise it will not work.
That is add static_discover=False
Correction, to work with the new version of google-api-python-client, it was necessary to pass an extra argument to the build function:
service = build(api_name, api_version, credentials=cred,static_discovery=False)
Thank you so much man, you saved my day!!
Thank you so much for your work!!!
This is the lesson what I looking for!
Hi, when i tried to run "
init_photo_service.py", I keep getting the error "Traceback (most recent call last):
File "C:/imgur2-master/google photo ini.py", line 2, in
from Google import Create_Service
ModuleNotFoundError: No module named 'Google'"
Google.py file is a utility module I wrote. Check the description for the link to access the source code.
@@jiejenn got it!! thank you!!
Hello Jie Jenn,
Thanks for sharing this information about the Google Photos API, question, with this is it possible to manage my users' google photos storage in a Google workspace?
You mean other users?
@@jiejenn Yes, I am the administrator of a Google Workspace domain and I want to manage the photo information of these users (Create, delete, edit).
hi, thank you for the video.
just a question, i dont get the 'photos library service crated succesfuly ' notfication. do you know wht it can happen?
It means you have successfully connect to photos API. You can modify the source code based on your workflow.
whenever I try to run the first stage of the code,it throws me these two errors -
No name 'auth' in module google pylint(no name in module)
unable to import google.auth.transport.requests pylint(import error)
I'm having these troubles in google.py file and I'm using visual studio code.
Have you installed Google Client library?
To install Google Client library
pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
@@jiejenn Yes I've followed every step that is shown in the video but still these two bugs popping.
@@chupehuweustaad6742 Hello; I am having the same problem... did you find the fix ?! Thanks !
@@jiejenn Hello, this happens to me too.. The command is already installed... What can we try ? Thanks !
@@chupehuweustaad6742 I've found the fix here: you have to install two libraries with "pip install google-auth" and "pip install requests": stackoverflow.com/questions/51006382/no-module-named-requests-when-trying-to-use-google-oauth2-with-docker
Thanks, it worked like a charm
Correction, to work with the new version of google-api-python-client, it was necessary to pass an extra argument to the build function:
service = build(api_name, api_version, credentials=cred,static_discovery=False)
Google Photos API - What project do you want to do based on this?
I will be releasing another tutorial soon based on PyQt5 framework and Google Photos API to build a desktop application to ease the photos upload.
@@jiejenn Excellent! It will be interesting!
Dear Sir i want to search object by google lens in google photo lens library. I have 4000 png images of different things. I want to use google lens camera to take a picture of an object and search in my images library. like object detection in images projects. but in my images the object shape, size and location are different in images. Google lens detects well by taking a picture of something to find the object. but it searches from google and i want that google lens search only in my images library. I can't do that. please if you can help do that, thanks
Hello sir, how do I get all the media share link of Google Photos album?
Hi, I have an error
googleapiclient.errors.UnknownApiNameOrVersion: name: photoslibrary version: v1
Hi, I'm also getting this error - not sure if there's been a version update but I can't find any info online
I just tested the script, and it is working fine for me.
snipboard.io/ENqC8T.jpg
Makes sure there are no typos in your code.
CLIENT_SECRET_FILE = ''
API_NAME = 'photoslibrary'
API_VERSION = 'v1'
SCOPES = ['www.googleapis.com/auth/photoslibrary',
'www.googleapis.com/auth/photoslibrary.sharing']
service = Create_Service(CLIENT_SECRET_FILE, API_NAME, API_VERSION, SCOPES)
I also have this same issue along with a few more people. we have the problem on both Windows and Linux. However on 1 Linux machine, it works fine. same exact code on all. no solution yet.
how to set up consent screen?
Hi Jie Jenn where can I find a python code to download all photos from my google photos? Thanks.
I'm working on it, will post the video with script today or tomorrow.
Thank you for your video.
When I follow your steps, I obtain this error in "French"
[WinError 10013] Une tentative d’accès à un socket de manière interdite par ses autorisations d’accès a été tentée
Please reference the solution in the comment.
github.com/googleworkspace/python-samples/issues/86
I need automatically upload videos from DVR camera. Camera after drive sending video to Raspberry Pi. I need upload all video from folder to my Google Photos on select album. How make it?
Anyone know how to resolve this line in php api?:
$authCredentials = new UserRefreshCredentials( /* Add your scope, client secret and refresh token here */ );
Traceback (most recent call last):
File "c:\Programming\Python\GooglePhotos\Scripts\init_GooglePhotos_service.py", line 2, in
from Google import Create_Service
ModuleNotFoundError: No module named 'Google'
Code:
import os
from Google import Create_Service
API_NAME = 'MyGooglePhotosApp'
API_VERSION = 'v1'
CLIENT_SECRET_FILE = 'Client_Secret_MyGooglePhotosApp.json'
SCOPES = ['www.googleapis.com/auth/photoslibrary',
'www.googleapis.com/auth/photoslibrary.sharing']
service = Create_Service(CLIENT_SECRET_FILE,API_NAME, API_VERSION, SCOPES)
(GooglePhotos) PS C:\Programming\python\GooglePhotos\scripts> pip show Google
Name: google
Version: 3.0.0
Summary: Python bindings to the Google search engine.
Home-page: breakingcode.wordpress.com/
Author: Mario Vilas
Author-email: mvilas@gmail.com
License: UNKNOWN
Location: c:\programming\python\googlephotos\lib\site-packages
Requires: beautifulsoup4
Required-by:
I feel like I'm missing something obvious but I'm not seeing it. Does it matter that the Google package says it's for Google search engine and not referencing Photos?
Any help would be greatly appreciated.
1. Google.py module (case sensitive) is an utility I wrote to simplify Google API service creation. You can get the source code here learndataanalysis.org/google-py-file-source-code/
2. API_NAME should be the Google API service name not the app name, so change the API_NAME variable to API_NAME = 'photoslibrary'.
Once you fix 1 and 2, your script should work fine.