Google analytics .dat file missing, falling back to noauth_local_webserver

丶灬走出姿态 提交于 2020-01-13 00:30:57

问题


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: UserWarning: Cannot access analytics.dat: No such file or directory warnings.warn(_MISSING_FILE_MESSAGE.format(filename))

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.

Falling back to --noauth_local_webserver and continuing with authorization.

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?


回答1:


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

  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.

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



来源:https://stackoverflow.com/questions/43787699/google-analytics-dat-file-missing-falling-back-to-noauth-local-webserver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!