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

User template crashes on viewing user's number of changes #1014

Open
james2432 opened this issue Oct 30, 2019 · 0 comments
Open

User template crashes on viewing user's number of changes #1014

james2432 opened this issue Oct 30, 2019 · 0 comments

Comments

@james2432
Copy link

2019-10-30 11:51:45,280 http://tasks.osmcanada.ca/user/LogicalViolinist
Traceback (most recent call last):
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid_exclog/__init__.py", line 111, in exclog_tween
    return handler(request)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid/router.py", line 145, in handle_request
    view_name
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid/view.py", line 527, in _call_view
    response = view_callable(context, request)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid/config/views.py", line 376, in rendered_view
    context)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid/renderers.py", line 443, in render_view
    return self.render_to_response(response, system, request=request)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid/renderers.py", line 466, in render_to_response
    result = self.render(value, system_values, request=request)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid/renderers.py", line 462, in render
    result = renderer(value, system_values)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid_mako/__init__.py", line 156, in __call__
    reraise(MakoRenderingException(errtext), None, exc_info[2])
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid_mako/__init__.py", line 148, in __call__
    result = template.render_unicode(**system)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/mako/template.py", line 471, in render_unicode
    as_unicode=True)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/mako/runtime.py", line 838, in _render
    **_kwargs_for_callable(callable_, data))
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/mako/runtime.py", line 873, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/mako/runtime.py", line 899, in _exec_template
    callable_(context, *args, **kwargs)
  File "base_mako", line 185, in render_body
  File "user_mako", line 118, in render_content
  File "/srv/osmtm/osm-tasking-manager2/osmtm/i18n.py", line 39, in auto_plural_translate
    return localizer.pluralize(*args, **kwargs)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid/i18n.py", line 114, in pluralize
    mapping=mapping)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/translationstring/__init__.py", line 401, in pluralizer
    policy(translations, singular, plural, n, domain, context))
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/translationstring/__init__.py", line 354, in dungettext_policy
    translated = translations.dungettext(domain, msgid, plural, n)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid/i18n.py", line 360, in dungettext
    singular, plural, num)
  File "/usr/lib/python2.7/gettext.py", line 485, in ungettext
    tmsg = self._catalog[(msgid1, self.plural(n))]
  File "<string>", line 4, in func
  File "/usr/lib/python2.7/gettext.py", line 166, in _as_int
    (n.__class__.__name__,))
MakoRenderingException:

Traceback (most recent call last):
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid_mako/__init__.py", line 148, in __call__
    result = template.render_unicode(**system)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/mako/template.py", line 471, in render_unicode
    as_unicode=True)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/mako/runtime.py", line 838, in _render
    **_kwargs_for_callable(callable_, data))
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/mako/runtime.py", line 873, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/mako/runtime.py", line 899, in _exec_template
    callable_(context, *args, **kwargs)
  File "/srv/osmtm/osm-tasking-manager2/osmtm/templates/base.mako", line 114, in render_body
    ${custom.before_content()}
  File "/srv/osmtm/osm-tasking-manager2/osmtm/templates/user.mako", line 50, in render_content
    ${ngettext('This user has submitted ${changes} total changeset.', 'This user has submitted ${changes} total changesets.', changeset_count, mapping={'changes':changeset_count})}
  File "/srv/osmtm/osm-tasking-manager2/osmtm/i18n.py", line 39, in auto_plural_translate
    return localizer.pluralize(*args, **kwargs)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid/i18n.py", line 114, in pluralize
    mapping=mapping)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/translationstring/__init__.py", line 401, in pluralizer
    policy(translations, singular, plural, n, domain, context))
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/translationstring/__init__.py", line 354, in dungettext_policy
    translated = translations.dungettext(domain, msgid, plural, n)
  File "/srv/osmtm/osm-tasking-manager2/env/local/lib/python2.7/site-packages/pyramid/i18n.py", line 360, in dungettext
    singular, plural, num)
  File "/usr/lib/python2.7/gettext.py", line 485, in ungettext
    tmsg = self._catalog[(msgid1, self.plural(n))]
  File "<string>", line 4, in func

  File "/usr/lib/python2.7/gettext.py", line 166, in _as_int
    (n.__class__.__name__,))
TypeError: Plural value must be an integer, got unicode

Seems when it's getting the number of changes there's text that's returned instead of an interger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant