[prod] ISE: ZeroDivisionError: float division

VERIFIED FIXED in 1.1

Status

VERIFIED FIXED
8 years ago
8 years ago

People

(Reporter: mbrandt, Assigned: wenzel)

Tracking

unspecified

Details

(Whiteboard: [prod], URL)

(Reporter)

Description

8 years ago
https://markup.mozilla.org/pt-BR/gml/2nmx/

Traceback (most recent call last):

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/vendor/src/django/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/vendor/src/django/django/utils/decorators.py", line 76, in _wrapped_view
    response = view_func(request, *args, **kwargs)

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/markup/views.py", line 90, in gml
    response = render_response(request, 'gml.xml', context, mimetype='application/xml')

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/../ffdemo/utils/render.py", line 11, in render_response
    return http.HttpResponse(loader.get_template(template).render(c), status=status, mimetype=mimetype, content_type=content_type)

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/vendor/src/django/django/template/__init__.py", line 173, in render
    return self._render(context)

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/vendor/src/django/django/template/__init__.py", line 167, in _render
    return self.nodelist.render(context)

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/vendor/src/django/django/template/__init__.py", line 796, in render
    bits.append(self.render_node(node, context))

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/vendor/src/django/django/template/__init__.py", line 809, in render_node
    return node.render(context)

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/vendor/src/django/django/template/defaulttags.py", line 174, in render
    nodelist.append(node.render(context))

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/vendor/src/django/django/template/defaulttags.py", line 174, in render
    nodelist.append(node.render(context))

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/vendor/src/django/django/template/__init__.py", line 844, in render
    output = self.filter_expression.resolve(context)

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/vendor/src/django/django/template/__init__.py", line 579, in resolve
    new_obj = func(obj, *arg_vals)

  File "/data/www/python/markup.mozilla.org/markup/ffdemo/../ffdemo/markup/templatetags/gml_extras.py", line 9, in normalize_point
    ret_val = float(value) / arg

ZeroDivisionError: float division
(Assignee)

Comment 1

8 years ago
I fixed this by returning 0 if "arg" is 0. This is caused by invalid marks, so all we need really is returning 0 here.

https://github.com/mozilla/markup/commit/8f28b15
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Assignee)

Updated

8 years ago
Assignee: nobody → fwenzel
(Reporter)

Comment 2

8 years ago
QA verified... thx wenzel!
Status: RESOLVED → VERIFIED
(Reporter)

Updated

8 years ago
Target Milestone: --- → 1.1
You need to log in before you can comment on or make changes to this bug.