3

Try to extract data from Google Analytics API. The code has been worked fine until yesterday. Right now I see these warnings in a debug.log.

WARNING:oauth2client.contrib.locked_file:Could not acquire lock <PATH> in 0 seconds
    DEBUG:googleapiclient.discovery_cache.file_cache:Could not obtain a lock for the cache file.
    INFO:googleapiclient.discovery:URL being requested: GET https://www.googleapis.com/analytics/v3/data/ga?sort=-ga%3Avisits&max-results=10&dimensions=ga%3Amedium&start-date=2016-05-10&start-index=1&ids=ga%3A57752509&metrics=ga%3Avisits&alt=json&end-date=2016-06-09

I changed nothing in the code. The problem is occuring when I try to run this method:

  def access(self, profile_id):
      self.profile_id = profile_id
      self.argv = sys.argv
      # Authenticate and construct service.
      self.service, flags = sample_tools.init(
          self.argv, 'analytics', 'v3', __doc__, __file__,
          scope='https://www.googleapis.com/auth/analytics.readonly')

The whole code can be found github.com/google...

mailman_73
  • 778
  • 12
  • 29
  • When did you last have a clean data extraction? Are you using the latest code version/api version? – Mr.Rebot Jun 11 '16 at 03:59
  • @Mr.Rebot I don't know exactly. It happened maybe a week ago. The example of the code you can see [here](https://github.com/google/google-api-python-client/blob/master/samples/analytics/hello_analytics_api_v3.py) – mailman_73 Jun 11 '16 at 08:52

0 Answers0