Python。谷歌分析报告Api警告oauth2client.contrib.u文件:无法在0秒内获取锁<PATH>

2024-03-29 06:53:13 发布

您现在位置:Python中文网/ 问答频道 /正文

尝试从Google分析API提取数据。直到昨天,代码一直运行良好。现在我看到这些警告调试.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

我没有改变密码。 尝试运行此方法时出现问题:

  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')

整个代码可以找到github.com/google...


Tags: 代码httpsselfcomidlockcachenot