Looking at the source code of osqa
, here's what can be found around the lines where you're having an issue (the line numbers differ from yours, but that's probably due to a version difference):
347 for k in auth_keys:
348 provider = AUTH_PROVIDERS.get(k.provider, None)
349
350 if provider is not None:
351 name = "%s: %s" % (provider.context.human_name, provider.context.readable_key(k))
352 else:
353 from forum.authentication.base import ConsumerTemplateContext
354 "unknown: %s" % ConsumerTemplateContext.readable_key(k)
355
356 auth_keys_list.append({
357 'name': name,
358 'id': k.id
359 })
Looks like at line 354, we should have name = "unknown: %s" % ConsumerTemplateContext.readable_key(k)
, but someone forgot that name =
.
I can't be 100% sure about this, as I am not really knowledgeable in osqa
, but this statement doesn't do anything otherwise if we leave it like it is. Additionally, your bug is 100% reproductible provided you can identify why k.provider
isn't in AUTH_PROVIDERS
, which I guess has to be pretty uncommon.
You might want to file a bug at osqa
's bug tracker. To solve your issue in the shorter term, you could:
- Figure out why your
provider
isNone
. (Apparently, the issue caused by there being andauth_key
for the currentuser
that doesn't correspond to any ofAUTH_PROVIDERS
). - Fix that line in the code yourself.