0
votes

Hi hope anyone can help =) Im trying to use Google API and the build instance has no attributes. Not even the sample Project from Google works: https://developers.google.com/calendar/quickstart/python

I have tried to reinstall the libraries and forcing reinstall using: "pip install --force-reinstall google-api-python-client".

Code from another google site wich does not work either:

from googleapiclient.discovery import build

API_KEY='my_apiKey'

GPLUS = build('plus', 'v1', developerKey=API_KEY)
TMPL = '''
    User: %s
    Date: %s
    Post: %s
'''
items = GPLUS.event()  # AttributeError: 'Resource' object has no attribute 'event'

2

2 Answers

0
votes

The service you're building with the code you provided is the Google+ API Client. According to the docs for this client there's no attribute or function called event(), and so you get the corresponding error message when running your code. Take a look at those docs to see what you should be able to do with this client. There appears to be a quick sample on Github.

0
votes

After some more testing i can verify that there exist attributes since the code is working but pylint in VS Code does not find the attributes and therefore mark them as non existing.

I have not idea though why this is happening.