diff --git a/processors/text-analysis/post_topic_matrix.py b/processors/text-analysis/post_topic_matrix.py index aa0619436..da2669d5c 100644 --- a/processors/text-analysis/post_topic_matrix.py +++ b/processors/text-analysis/post_topic_matrix.py @@ -141,6 +141,10 @@ def process(self): raise ProcessorInterruptedException("Interrupted while writing results file") # Grab metadata related to post + if post.get('id') not in token_metadata: + # post has no tokens... + continue + token_data = token_metadata[str(post.get('id'))] model_data = model_metadata[token_data.get('filename')] interval = token_data['interval']