From a113dd2f903990c3dc8c06cd172dd23ad4a05c2d Mon Sep 17 00:00:00 2001 From: Awais Jibran Date: Mon, 31 Aug 2020 16:50:22 +0500 Subject: [PATCH] Adding debug logs for CR-2618 --- common/lib/capa/capa/capa_problem.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/common/lib/capa/capa/capa_problem.py b/common/lib/capa/capa/capa_problem.py index a3354b47c6..bce772e573 100644 --- a/common/lib/capa/capa/capa_problem.py +++ b/common/lib/capa/capa/capa_problem.py @@ -190,7 +190,17 @@ class LoncapaProblem(object): problem_text = problem_text.encode('utf-8') self.tree = etree.XML(problem_text) - self.make_xml_compatible(self.tree) + try: + self.make_xml_compatible(self.tree) + except Exception: + capa_module = self.capa_module + log.exception( + "CAPAProblemError: %s, id:%s, data: %s", + capa_module.display_name, + self.problem_id, + capa_module.data + ) + raise # handle any tags self._process_includes()