asked 2011-01-03 15:06:44 -0500Benoit
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/repute.py 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/badges.py 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.
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.
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.create your Q&A site
Asked: 2011-01-03 15:06:44 -0500
Seen: 31 times
Last updated: Jan 05 '11