1

I have some problems getting data back via the Google Analytics API with python 3.5.

I'm doing exactly what is written in https://developers.google.com/api-client-library/python/apis/analytics/v3#sample. I've downloaded the sample files which can be found here: https://github.com/google/google-api-python-client/tree/master/samples/analytics and Google is linking to.

Then is installed the api client via "pip install --upgrade google-api-python-client".

Next I created a new project in the Google Developers Console, downloaded the Authorized API (OAuth 2.0) .json file and pasted it in the project folder. Now I run the hello_analytics_api_v3.py file which I had downloaded before - and nothing happens.

The program is running through, finishes (in any way) and giving me no output and no error message neither. I started to search for the function which is causing that strange behavior and finally came to the open_and_lock function, which can be found in oauth2client/contrib/_win32_opener.py.

Now I don't know, what exactly is causing the problem. Is there something wrong within the _win32_opener.py file? Is it my version of python? Is it... - whatever?

I'm using Python 3.5 (within Anaconda) and tried it with the 64bit and 32bit installer - with both versions it is the same: no reaction, no output, no return.

Who can help me? Or who knows a simple way for dummies to get data out of analytics into python?

Mark Chackerian
  • 16,691
  • 6
  • 95
  • 91
Steve Iron
  • 171
  • 5
  • 12

1 Answers1

0

I've found the problem. It seems like the google-api-python-client doesn't work with Python 3.5 within Anaconda.

Steve Iron
  • 171
  • 5
  • 12