Closed Bug 1238074 Opened 8 years ago Closed 5 years ago

[traceback] In googleanalytics.py: AttributeError: 'NoneType' object has no attribute 'get'

Categories

(support.mozilla.org :: Code Quality, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mythmon, Unassigned)

Details

(Whiteboard: u=dev p=1)

This comes up occasionally in cron error mail. I suspect it is because some google analytics has nothing interesting to tell us and sends back None.

Traceback (most recent call last):
  File "manage.py", line 32, in <module>
    execute_from_command_line(sys.argv)
  File "/data/support/src/support.mozilla.org/kitsune/virtualenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/data/support/src/support.mozilla.org/kitsune/virtualenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/data/support/src/support.mozilla.org/kitsune/virtualenv/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/data/support/src/support.mozilla.org/kitsune/virtualenv/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/data/support/src/support.mozilla.org/kitsune/virtualenv/lib/python2.7/site-packages/cronjobs/management/commands/cron.py", line 64, in handle
    registered[script](*args)
  File "/data/support/www/support.mozilla.org/kitsune/kitsune/dashboards/cron.py", line 25, in reload_wiki_traffic_stats
    period, verbose=settings.DEBUG)
  File "/data/support/www/support.mozilla.org/kitsune/kitsune/dashboards/models.py", line 50, in reload_period_from_analytics
    *period_dates(period), verbose=verbose)
  File "/data/support/www/support.mozilla.org/kitsune/kitsune/sumo/googleanalytics.py", line 157, in pageviews_by_document
    for result in results.get('rows', []):
AttributeError: 'NoneType' object has no attribute 'get'
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.