Ask Your Question

Exception 'taxonomist' unknown key

asked 2011-01-03 15:06:44 -0600

Benoit's avatar

updated 2011-01-05 15:30:15 -0600

Evgeny's avatar

In 0.6.17, I have a user with the "taxonomist" badge. Just migrated to 0.6.49 (or thereabout). When displaying the user, I get a KeyError exception (u'taxonomist' exception). The bottom of the stack has:

/ala-windanswer1/qa/wrqa_dev/askbot/models/ in description
        return badges.get_badge(self.slug).description ...
▼ Local vars
Variable    Value
badges  <module 'askbot.models.badges' from '/ala-windanswer1/qa/wrqa_dev/askbot/models/badges.pyc'>
self   Error in formatting: u'taxonomist'  
/ala-windanswer1/qa/wrqa_dev/askbot/models/ in get_badge
    return BADGES [key]() ...
▼ Local vars
Variable    Value
key u'taxonomist'
name    u'taxonomist'

Turns out there are a number of badges that have disapeared: Alpha, Beta, Expert, Stunk & White, Taxonomist, Yearling.

Looks like we need code to deal with badges that have been dropped so we don't get an exception.

edit retag flag offensive close merge delete


Thanks, I will create at least "Taxonomist" and "Expert" - in a couple of hours - at least in the stub form so that there are no exceptions like that. Stunk & White is renamed to "Associate Editor", alpha and beta I guess will be gone - will create a cleanup command.
Evgeny's avatar Evgeny  ( 2011-01-03 15:30:49 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2011-01-03 19:48:19 -0600

Evgeny's avatar

updated 2011-01-05 01:05:25 -0600

Added two stub badges - Expert and Taxonomist. They are not yet awarded, but this error message should go away.

edit: Made taxonomist and commentator to work.

Either version 0.6.54 or this github commit have the fix.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-01-03 15:06:44 -0600

Seen: 183 times

Last updated: Jan 05 '11