Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix script following new movers formula (bug 1059964) #282

Merged

Conversation

magopian
Copy link
Contributor

fixes bug 1059964

This should fix the following cron error (previous fix was incomplete it seems):

Traceback (most recent call last):
  File "manage.py", line 93, in <module>
    execute_from_command_line(sys.argv)
  File "/data/mkt.prod/www/addons.mozilla.org/deploy-olympia-prod-20140912190542-8aa86cd45b/venv/lib/python2.6/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/data/mkt.prod/www/addons.mozilla.org/deploy-olympia-prod-20140912190542-8aa86cd45b/venv/lib/python2.6/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/data/mkt.prod/www/addons.mozilla.org/deploy-olympia-prod-20140912190542-8aa86cd45b/venv/lib/python2.6/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/data/mkt.prod/www/addons.mozilla.org/deploy-olympia-prod-20140912190542-8aa86cd45b/venv/lib/python2.6/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/data/mkt.prod/www/addons.mozilla.org/deploy-olympia-prod-20140912190542-8aa86cd45b/olympia/apps/stats/management/commands/update_theme_popularity_movers.py", line 57, in handle
    persona_id=addon_to_persona[addon_id],
KeyError: 5L

@magopian magopian force-pushed the 1059964-fix-script-new-movers-formula branch from eae2362 to 0dca953 Compare September 13, 2014 17:19
# Loop over the three_weeks_avg_dict, which can't be shorter than the
# one_week_avg_dict.
for addon_id, prev_3_weeks in prev_3_weeks_avgs.iteritems():
for addon_id, pop in last_week_avgs.iteritems():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have something more explicit than pop?

@davidbgk
Copy link
Contributor

r+wc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants