Closed Bug 665764 Opened 13 years ago Closed 13 years ago

[prod] ISE: ZeroDivisionError: float division

Categories

(Websites Graveyard :: markup.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mbrandt, Assigned: wenzel)

References

()

Details

(Whiteboard: [prod])

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
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
Closed: 13 years ago
Resolution: --- → FIXED
Assignee: nobody → fwenzel
QA verified... thx wenzel!
Status: RESOLVED → VERIFIED
Target Milestone: --- → 1.1
Product: Websites → Websites Graveyard
You need to log in before you can comment on or make changes to this bug.