-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
Description
Probably related to #151, but in this case a project with 13k submissions had a single submission where a/b/c/name was a group containing three responses:
'a/b/c/name/q1': 'response 1''a/b/c/name/q3': 'response 2''a/b/c/name/q2': 'response 3'
In every other submission, a/b/c/name was a question, i.e. the submission data contained 'a/b/c/name': 'response'. This discrepancy caused exports to fail with unhashable type: 'list':
TypeError: unhashable type: 'list'
File "kpi/models/import_export_task.py", line 116, in run
self._run_task(msgs)
File "kpi/models/import_export_task.py", line 565, in _run_task
for line in export.to_csv(submission_stream):
File "formpack/reporting/export.py", line 477, in to_csv
for chunk in self.parse_submissions(submissions):
File "formpack/reporting/export.py", line 139, in parse_submissions
formatted_chunks = self.parse_one_submission(submission)
File "formpack/reporting/export.py", line 130, in parse_one_submission
return self.format_one_submission([submission.data], section)
File "formpack/reporting/export.py", line 341, in format_one_submission
cells = field.format(val, _lang)
File "formpack/schema/fields.py", line 651, in format
val = self.get_translation(val, lang)
File "formpack/schema/fields.py", line 641, in get_translation
translation = self.choice.options[val]['labels'][lang]
https://sentry.kbtdev.org/kobo/unhcr-kpi-backend/issues/329314/?query=is%3Aunresolved%20unhashable