For certain combinations of input files and taxonomies it happens that
the ckw_out dictionary does not contain all composite keywords in
the candidates list. This would normally raise a KeyError using
a string representation of the keyword, but it turns out that that fails
with an AttributeError since none of the composite keywords contain
a short_id attribute, shadowing the original error.
This commit prevents the KeyError from happening, but does not fix
the underlying fact that composite keyword are impossible to print.
Sentry: https://sentry.inspirehep.net/inspire-sentry/prod/issues/6/
For certain combinations of input files and taxonomies it happens that the
ckw_out
dictionary does not contain all composite keywords in thecandidates
list. This would normally raise aKeyError
using a string representation of the keyword, but it turns out that that fails with anAttributeError
since none of the composite keywords contain ashort_id
attribute, shadowing the original error.This commit prevents the
KeyError
from happening, but does not fix the underlying fact that composite keyword are impossible to print.