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

Python Api not working for Picasa/Google Photo #246

Closed
NotaLabs opened this issue Jun 30, 2016 · 3 comments
Closed

Python Api not working for Picasa/Google Photo #246

NotaLabs opened this issue Jun 30, 2016 · 3 comments
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@NotaLabs
Copy link

Hello,
i tried to use the ypthon api with picasa/google photo. I got the authentification process right, but then i get an error when i try to build the api object for picasa.

import httplib2
from oauth2client import client
from googleapiclient.discovery import build

flow = client.flow_from_clientsecrets(
    'client_secret.json',
    scope='https://picasaweb.google.com/data/',
    redirect_uri='http://localhost')

auth_uri = flow.step1_get_authorize_url()
print(auth_uri)

auth_code = input("Please enter the auth code ")

credentials = flow.step2_exchange(auth_code)
http_auth = credentials.authorize(httplib2.Http())

picasa = build('picasa',http_auth)

I get the following error:

C:\Users\Tim\AppData\Local\Programs\Python\Python35-32\python.exe C:/Users/Tim/PycharmProjects/copy+/googleconnect.py
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=146286492829-5nl303un65ng7ublcmir31jng2voh8br.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost&scope=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2F&access_type=offline
Please enter the auth code 4/zSkse9IsnMnOxeeRB9wis3u_QIdLkBlmUCMZrCj9Bac#
Traceback (most recent call last):
  File "C:/Users/Tim/PycharmProjects/copy+/googleconnect.py", line 18, in <module>
    picasa = build('picasa',http_auth)
  File "C:\Users\Tim\AppData\Local\Programs\Python\Python35-32\lib\site-packages\oauth2client\util.py", line 135, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "C:\Users\Tim\AppData\Local\Programs\Python\Python35-32\lib\site-packages\googleapiclient\discovery.py", line 218, in build
    "name: %s  version: %s" % (serviceName, version))
googleapiclient.errors.UnknownApiNameOrVersion: name: picasa  version: <httplib2.Http object at 0x00E87EF0>

Process finished with exit code 1

Am i using the wrong name to build the api-object or is picasa not supported ?

@theacodes
Copy link
Contributor

It appears not. If the API is not listed here, then it's not supported/doesn't exist.

@theacodes
Copy link
Contributor

I seems like there's a Picasa API based on the (very old) gdata APIs here. This client library does not support those APIs.

@k-funk
Copy link

k-funk commented Feb 15, 2017

:(
gdata doesn't support python3: google/gdata-python-client#29 and this library doesn't support any api to picasa/google photos.
Is there any python3 library to get photos, or one in the works?

akrherz pushed a commit to akrherz/google-api-python-client that referenced this issue Apr 1, 2019
…-level

Remove unnecessary top-level TOC for all modules.
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

4 participants