You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the autoreport in KPI is displayed alongside
Warning
This is an automated report based on raw data submitted to this project. Please conduct proper data cleaning prior to using the graphs and figures used on this page.
...we should treat invalid responses as if they were blank when calculating statistics.
Explanation
This problem is a manifestation of #151. Consider a form with two versions:
Version 1
type
name
label
start
start
end
end
text
i_started_life_as_a_text_question
i started life as a text question
Version 2
type
name
label
start
start
end
end
integer
i_started_life_as_a_text_question
i started life as a text question
If I submit hello while version 1 is deployed and 123 while version 2 is deployed, the autoreport will fail at
ValueError: invalid literal for int() with base 10: 'hello'
<snip>
File "kobo/apps/reports/report_data.py", line 178, in data_by_identifiers
split_by=split_by)
File "formpack/reporting/autoreport.py", line 209, in get_stats
return self._calculate_stats(submissions, fields, self.versions, lang)
File "formpack/reporting/autoreport.py", line 73, in _calculate_stats
values = list(field.parse_values(raw_value))
File "formpack/schema/fields.py", line 515, in parse_values
yield int(raw_values)
The text was updated successfully, but these errors were encountered:
Quick summary
Because the autoreport in KPI is displayed alongside
...we should treat invalid responses as if they were blank when calculating statistics.
Explanation
This problem is a manifestation of #151. Consider a form with two versions:
Version 1
Version 2
If I submit
hello
while version 1 is deployed and123
while version 2 is deployed, the autoreport will fail atformpack/src/formpack/schema/fields.py
Lines 513 to 517 in d4e4ce0
The text was updated successfully, but these errors were encountered: