Google Analytics .dat文件丢失,回退到noauth_local_webserver [英] Google analytics .dat file missing, falling back to noauth_local_webserver

查看:135
本文介绍了Google Analytics .dat文件丢失,回退到noauth_local_webserver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台AWS EC2机器,该机器一直在每晚运行一次Google Analytics(分析)脚本以加载到数据库中。直到本周末为止,它已经工作了几个月。我没有对代码进行任何更改。

I have an AWS EC2 machine that has been running nightly google analytics scripts to load into a database. It has been working fine up for months until this weekend. I have not made any changes to the code.

这些是我的日志中显示的两个错误:

These are the two errors that are showing up in my logs:

/venv/lib/python3.5/site-packages/oauth2client/_helpers.py:256:用户警告:无法访问analytics.dat:无此类文件或目录
warnings.warn(_MISSING_FILE_MESSAGE.format(filename ))

/venv/lib/python3.5/site-packages/oauth2client/_helpers.py:256: UserWarning: Cannot access analytics.dat: No such file or directory warnings.warn(_MISSING_FILE_MESSAGE.format(filename))

无法启动本地Web服务器监听端口8080
或端口8090。请检查您的防火墙设置以及在本地运行的
程序可能正在阻止或使用这些端口。

Failed to start a local webserver listening on either port 8080 or port 8090. Please check your firewall settings and locally running programs that may be blocking or using those ports.

退回到--noauth_local_webserver并继续进行
授权。

Falling back to --noauth_local_webserver and continuing with authorization.

它似乎丢失了我的analytics.dat文件,但我已经检查过,该文件与调用GA API的脚本位于同一文件夹中。我一直在寻找解决问题的方法,但是关于GA的上述错误的资源却很少。

It looks like it is missing my analytics.dat file but I have checked and the file is in the same folder as the script that calls the GA API. I have been searching for hours trying to figure this out but there are very little resources on the above errors for GA.

有人知道这是怎么回事吗?关于如何解决更多问题的任何想法?

Does anyone know what might be going on here? Any ideas on how to troubleshoot more?

推荐答案

我不确定为什么会发生这种情况,但是我列出了一些步骤可能会对您有所帮助。

I am not sure why this is happening, But I have a list of steps which might help you.


  1. 检查此问题是否是由Google Analytics(分析)API版本引起的,google通常会弃用其API的先前版本。
  1. check if this issue is caused by google analytics API version, google generally deprecates the previous versions of their API.
  2. I am guessing that you are running this code on cron on your EC2 serv, make sure that you include the path to the folder where the .dat file is. 3.check whether you have the latest credentials in the .dat file.

对API的身份验证将通过 .dat 文件进行。
希望这能解决您的问题。

Authentication to the API will happen through the .dat file. Hope this solves your issue.

这篇关于Google Analytics .dat文件丢失,回退到noauth_local_webserver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆