Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception AttributeError: 'list' object has no attribute 'split' on charts endpoint #966

Closed
ukanga opened this issue Mar 22, 2017 · 0 comments

Comments

@ukanga
Copy link
Member

ukanga commented Mar 22, 2017

File "./onadata/apps/api/viewsets/charts_viewset.py" in retrieve
  94.                 field_name, xform, fmt, group_by, field_xpath)

File "./onadata/libs/utils/chart_tools.py" in get_chart_data_for_field
  493.             data_view=data_view)

File "./onadata/libs/utils/chart_tools.py" in build_chart_data_for_field
  309.                 choices=grp_choices)

File "./onadata/libs/utils/chart_tools.py" in _use_labels_from_group_by_name
  204.                         get_choice_label(choices, item[truncated_name])

File "./onadata/libs/utils/chart_tools.py" in get_choice_label
  118.                 find_choice_label(choices, name) for name in string.split(" ")

Exception Type: AttributeError at /api/v1/charts/[pk].json
Exception Value: 'list' object has no attribute 'split'
Request information:
GET:
group_by = u'sex,sex'
field_xpath = u'people'

Aha! Link: https://ona.aha.io/features/PROD-593

@ukanga ukanga added this to the Week 14 milestone Mar 30, 2017
@ukanga ukanga added the Has-PR label Mar 30, 2017
@ukanga ukanga closed this as completed in 924d0fa Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant