SSLHandshakeError when connecting to Google Analytics using Google APIs Client Library for Python
I'm trying to connect to Google Analytics using a Service Account, but I get the following error: SSLHandshakeError at ... [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed I have PyOpenSSL and PyCrypto installed and updated. Here's the code I use to connect: from oauth2client.client import SignedJwtAssertionCredentials from apiclient.discovery import build import httplib2 def initialize_service(): f = open('path_to_key_file.p12', 'rb') key = f.read() f.close() credentials = SignedJwtAssertionCredentials('XXXX#developer.gserviceaccount.com', key, scope='https://www.googleapis.com/auth/analytics.readonly') http = httplib2.Http() http = credentials.authorize(http) print 'This is printed' service = build('analytics', 'v3', http=http) print 'This is not printed' return service
It seems that the problem occurred because the system clock wasn't set to the current time.
always serializer is invalid
How do I flatten a hierarchical column index in a pandas DataFrame?
Why does 'while' cause the program to run longer in Python
QuerySet to JSON with nested objects
Python: How to populate Pandas column that depends on the previous value (previous row)?
Error with the open() function in python [closed]
Fine tuning pretrained model in keras
Getting the derivatives of Legendre polynomials in Python
Most recommended/used library for desiging POM code (Python)
how can I add dictionaries in dictionary
Too many to unpack tuple NLTK Chat
CNTK Python how to pass multiple features into model
Python Pandas GroupBy % calculation
Programmatic copy and paste XML Node in MS Word Document?
What specific requirements does the function passed to scipy.optimize.curve_fit need to fulfill in order to run?
Organizing daily Excel data into xarray dataset