[prod][traceback] 500 error: NoReverseMatch: Reverse for 'list_country' with arguments '()' and keyword arguments '{'country': u'Hong Kong S.A.R.'}' not found.

VERIFIED FIXED

Status

Participation Infrastructure
Phonebook
--
critical
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: mbrandt, Assigned: nemo)

Tracking

2014-07.1

Details

(Whiteboard: [prod][traceback], URL)

(Reporter)

Description

3 years ago
Steps to reproduce:
0. goto https://mozillians.org/zh-TW/u/sammyfung/

Traceback (most recent call last):

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/core/handlers/base.py", line 113, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/usr/lib64/python2.6/site-packages/newrelic-2.16.0.12/newrelic/hooks/framework_django.py", line 492, in wrapper
    return wrapped(*args, **kwargs)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/views/decorators/cache.py", line 89, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)

  File "/data/www/mozillians.org/mozillians/mozillians/phonebook/views.py", line 136, in view_profile
    return render(request, 'phonebook/profile.html', data)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/shortcuts/__init__.py", line 53, in render
    return HttpResponse(loader.render_to_string(*args, **kwargs),

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/template/loader.py", line 177, in render_to_string
    return t.render(context_instance)

  File "/data/www/mozillians.org/mozillians/vendor/src/jingo/jingo/__init__.py", line 195, in render
    return super(Template, self).render(context_dict)

  File "/usr/lib64/python2.6/site-packages/newrelic-2.16.0.12/newrelic/api/function_trace.py", line 89, in dynamic_wrapper
    return wrapped(*args, **kwargs)

  File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)

  File "/data/www/mozillians.org/mozillians/mozillians/templates/phonebook/profile.html", line 1, in top-level template code
    {% extends "base.html" %}

  File "/data/www/mozillians.org/mozillians/mozillians/templates/base.html", line 158, in top-level template code
    {% block content_wrapper %}

  File "/data/www/mozillians.org/mozillians/mozillians/templates/base.html", line 170, in block "content_wrapper"
    {% block content %}{% endblock %}

  File "/data/www/mozillians.org/mozillians/mozillians/templates/phonebook/profile.html", line 101, in block "content"
    <i class="icon-globe"></i> {% include 'phonebook/includes/profile_location.html' %}

  File "/data/www/mozillians.org/mozillians/mozillians/templates/phonebook/includes/profile_location.html", line 19, in top-level template code
    <a href="{{ url('phonebook:list_country', country=profile.geo_country.name) }}">

  File "/data/www/mozillians.org/mozillians/vendor/src/funfactory/funfactory/helpers.py", line 30, in url
    return reverse(viewname, args=args, kwargs=kwargs)

  File "/data/www/mozillians.org/mozillians/vendor/src/funfactory/funfactory/urlresolvers.py", line 30, in reverse
    url = django_reverse(viewname, urlconf, args, kwargs, prefix)

  File "/usr/lib64/python2.6/site-packages/newrelic-2.16.0.12/newrelic/hooks/framework_django.py", line 586, in wrapper
    return execute(*args, **kwargs)

  File "/usr/lib64/python2.6/site-packages/newrelic-2.16.0.12/newrelic/hooks/framework_django.py", line 585, in execute
    return wrapped(viewname, *args, **kwargs)

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/core/urlresolvers.py", line 520, in reverse
    return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))

  File "/data/www/mozillians.org/mozillians/vendor/lib/python/django/core/urlresolvers.py", line 440, in _reverse_with_prefix
    "arguments '%s' not found." % (lookup_view_s, args, kwargs))

NoReverseMatch: Reverse for 'list_country' with arguments '()' and keyword arguments '{'country': u'Hong Kong S.A.R.'}' not found.
Assignee: nobody → jgiannelos
Status: NEW → ASSIGNED

Comment 1

3 years ago
Commit pushed to master at https://github.com/mozilla/mozillians

https://github.com/mozilla/mozillians/commit/40f2d365d40a3b8cc37646e1e5f997ff0cf744fd
[Fix bug 1032905] Fix "country" regex in phonebook URLs.

Updated

3 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED

Updated

3 years ago
Version: other → next
Verified fixed on stage https://mozillians.allizom.org/zh-TW/u/sammyfung/

Thanks for reporting :mbrandt!
Status: RESOLVED → VERIFIED
(Reporter)

Comment 3

3 years ago
Do we have unit tests in place to catch this type of regression or should we implement the tests using Selenium?
Flags: needinfo?(giorgos)
The plan is to refactor these pages in bug 919762 (already made a comment there) and add extensive unit tests. Currently we don't have one.
Flags: needinfo?(giorgos)
Version: next → 2014-06.6
Version: 2014-06.6 → 2014-07.1
You need to log in before you can comment on or make changes to this bug.