dcramer/sentry — Issue #299: Not compatible with enabled number localization
Author: rassie
Created: 2012-01-13 16:11:52+00:00
State: open

On Sentry 1.13.5, with `USE_L10N = True` (or whatever option I'm actually using for localization ;-)) I'm getting

ValueError: invalid literal for int() with base 10: '1.529'

for `/sentry/jsapi/?op=resolve&gid=1.529`. No idea whether that's fixed in 2.0. Full traceback:

Traceback (most recent call last):

File "/usr/lib64/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)

File "/usr/lib64/python2.6/site-packages/django/views/decorators/csrf.py", line 39, in wrapped_view
resp = view_func(*args, **kwargs)

File "/usr/lib64/python2.6/site-packages/django/views/decorators/csrf.py", line 52, in wrapped_view
return view_func(*args, **kwargs)

File "/srv/myapp/virtualenv/lib/python2.6/site-packages/sentry/web/views.py", line 104, in wrapped
return func(request, *args, **kwargs)

File "/srv/myapp/virtualenv/lib/python2.6/site-packages/sentry/web/views.py", line 344, in ajax_handler
return locals()[op](request)

File "/srv/myapp/virtualenv/lib/python2.6/site-packages/sentry/web/views.py", line 334, in chart
group = GroupedMessage.objects.get(pk=gid)

File "/usr/lib64/python2.6/site-packages/django/db/models/manager.py", line 132, in get
return self.get_query_set().get(*args, **kwargs)

File "/usr/lib64/python2.6/site-packages/django/db/models/query.py", line 341, in get
clone = self.filter(*args, **kwargs)

File "/usr/lib64/python2.6/site-packages/django/db/models/query.py", line 550, in filter
return self._filter_or_exclude(False, *args, **kwargs)

File "/usr/lib64/python2.6/site-packages/django/db/models/query.py", line 568, in _filter_or_exclude
clone.query.add_q(Q(*args, **kwargs))

File "/usr/lib64/python2.6/site-packages/django/db/models/sql/query.py", line 1194, in add_q
can_reuse=used_aliases, force_having=force_having)

File "/usr/lib64/python2.6/site-packages/django/db/models/sql/query.py", line 1129, in add_filter
connector)

File "/usr/lib64/python2.6/site-packages/django/db/models/sql/where.py", line 67, in add
value = obj.prepare(lookup_type, value)

File "/usr/lib64/python2.6/site-packages/django/db/models/sql/where.py", line 316, in prepare
return self.field.get_prep_lookup(lookup_type, value)

File "/usr/lib64/python2.6/site-packages/django/db/models/fields/__init__.py", line 292, in get_prep_lookup
return self.get_prep_value(value)

File "/usr/lib64/python2.6/site-packages/django/db/models/fields/__init__.py", line 479, in get_prep_value
return int(value)

ValueError: invalid literal for int() with base 10: '1.537'