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

Form Submission Will Not Parse #366

Closed
wonderchook opened this issue Jul 9, 2016 · 1 comment
Closed

Form Submission Will Not Parse #366

wonderchook opened this issue Jul 9, 2016 · 1 comment

Comments

@wonderchook
Copy link
Contributor

wonderchook commented Jul 9, 2016

I filled out a few instances of a form and uploaded. One won't submit. The XML is available here. Have not been able to reproduce so far.

Traceback (most recent call last):
  File "/opt/cadasta/env/lib/python3.5/site-packages/django/core/handlers/base.py", line 149, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/opt/cadasta/env/lib/python3.5/site-packages/django/core/handlers/base.py", line 147, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/cadasta/env/lib/python3.5/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/opt/cadasta/env/lib/python3.5/site-packages/rest_framework/viewsets.py", line 87, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/cadasta/env/lib/python3.5/site-packages/rest_framework/views.py", line 466, in dispatch
    response = self.handle_exception(exc)
  File "/opt/cadasta/env/lib/python3.5/site-packages/rest_framework/views.py", line 463, in dispatch
    response = handler(request, *args, **kwargs)
  File "/vagrant/cadasta/xforms/views/api.py", line 35, in create
    data = serializer.save()
  File "/opt/cadasta/env/lib/python3.5/site-packages/rest_framework/serializers.py", line 191, in save
    self.instance = self.create(validated_data)
  File "/vagrant/cadasta/xforms/serializers.py", line 46, in create
    create_models = model_helper.add_data_to_models(survey)
  File "/vagrant/cadasta/xforms/mixins/model_helper.py", line 24, in add_data_to_models
    location = self.add_data_to_spatial_unit(data, project)
  File "/vagrant/cadasta/xforms/mixins/model_helper.py", line 42, in add_data_to_spatial_unit
    geometry=self._format_geometry(data['location_geometry']),
  File "/vagrant/cadasta/xforms/mixins/model_helper.py", line 88, in _format_geometry
    float(point.split(' ')[0])]
ValueError: could not convert string to float: 
@linzjax
Copy link
Contributor

linzjax commented Jul 11, 2016

Latest push to feature/xform branch should fix this

@linzjax linzjax closed this as completed Jul 11, 2016
@linzjax linzjax reopened this Jul 11, 2016
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

2 participants