Discussion:
Ugly and confusing error messages in /alertprofiles/
Ingeborg Hellemo
2011-12-19 09:19:15 UTC
Permalink
NAV 3.9.4

When editing filters and other items in Alert profiles we get several error
messages, but the things we are trying to do is indeed saved. Is this a NAV
issue or our version of Django?


In Alert Profiles -> Alert addresses -> New address

When I click "Save new" I get the following error, but when I go back to
<https://nav.uit.no/alertprofiles/address/> I see that the address is saved.

----------
NoReverseMatch at /alertprofiles/address/save/

Reverse for 'alertprofiles-address-detail' with arguments '(None,)' and
keyword arguments '{}' not found.

Request Method: POST
Request URL: https://nav.uit.no/alertprofiles/address/save/
Django Version: 1.3
Exception Type: NoReverseMatch
Exception Value:

Reverse for 'alertprofiles-address-detail' with arguments '(None,)' and
keyword arguments '{}' not found.

Exception Location: /usr/local/lib/python2.7/site-packages/django/core/urlreso
lvers.py in reverse, line 337
Python Executable: /usr/local/bin/python
Python Version: 2.7.2
Python Path:

['/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
'/usr/local/lib/python2.7/site-packages/simplejson-2.1.6-py2.7-freebsd-8.2-REL
EASE-amd64.egg',
'/usr/local/lib/python2.7/site-packages/zope.interface-3.6.5-py2.7-freebsd-8.2
-RELEASE-amd64.egg',
'/usr/local/lib/python2.7/site-packages/pyasn1-0.0.13b-py2.7.egg',
'/usr/local/lib/python2.7/site-packages/Cheetah-2.4.4-py2.7-freebsd-8.2-RELEAS
E-amd64.egg',
'/usr/local/lib/python2.7/site-packages/pyasn1_modules-0.0.1a-py2.7.egg',
'/usr/local/lib/python2.7/site-packages/python_ldap-2.4.3-py2.7-freebsd-8.2-RE
LEASE-amd64.egg',
'/usr/local/nav/lib/python',
'/usr/local/lib/python27.zip',
'/usr/local/lib/python2.7',
'/usr/local/lib/python2.7/plat-freebsd8',
'/usr/local/lib/python2.7/lib-tk',
'/usr/local/lib/python2.7/lib-old',
'/usr/local/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/site-packages']
-------


Similar error occurs when adding a new filter or a new filter group:

NoReverseMatch at /alertprofiles/filters/save/

Reverse for 'alertprofiles-filters-detail' with arguments '(None,)' and
keyword arguments '{}' not found.

Request Method: POST
Request URL: https://nav.uit.no/alertprofiles/filters/save/
Django Version: 1.3
Exception Type: NoReverseMatch
Exception Value:

Reverse for 'alertprofiles-filters-detail' with arguments '(None,)' and
keyword arguments '{}' not found.

Exception Location: /usr/local/lib/python2.7/site-packages/django/core/urlreso
lvers.py in reverse, line 337

-------

NoReverseMatch at /alertprofiles/filter-groups/save/

Reverse for 'alertprofiles-filter_groups-detail' with arguments '(None,)' and
keyword arguments '{}' not found.

Request Method: POST
Request URL: https://nav.uit.no/alertprofiles/filter-groups/save/
Django Version: 1.3
Exception Type: NoReverseMatch
Exception Value:

Reverse for 'alertprofiles-filter_groups-detail' with arguments '(None,)' and
keyword arguments '{}' not found.

Exception Location: /usr/local/lib/python2.7/site-packages/django/core/urlreso
lvers.py in reverse, line 337
Python Executable: /usr/local/bin/python



--Ingeborg
--
Ingeborg Østrem Hellemo -- ingeborg.hellemo-***@public.gmane.org
Dep. of Information Technology --- Univ. of Tromsø
Morten Brekkevold
2011-12-20 11:37:23 UTC
Permalink
Post by Ingeborg Hellemo
NAV 3.9.4
When editing filters and other items in Alert profiles we get several error
messages, but the things we are trying to do is indeed saved. Is this a NAV
issue or our version of Django?
One of the two, I'll have to check the NAV code, so please report this
bug at https://bugs.launchpad.net/nav/+filebug .

Also, if you enable DJANGO_DEBUG in nav.conf, you should expect your
error messages to be "ugly and confusing", because that's what you asked
for. That confusing DEBUG dump also happens to be what we developers
need to track down the problem in the code.

Disable DJANGO_DEBUG if you want a simple, not-at-all-helpful "something
went wrong" error message displayed on the web page. The NAV site
administrator may still get mailed the full traceback data, and they
will typically also be logged in your Apache error log.
--
Morten Brekkevold
UNINETT
Ingeborg Hellemo
2011-12-20 11:49:51 UTC
Permalink
Also, if you enable DJANGO_DEBUG in nav.conf, you should expect your error
messages to be "ugly and confusing", because that's what you asked for.
I know about the "ugly" part, but even if we minimize this to "something went
wrong" it is still confusing to get an error when nothing (obvious) is wrong.


--Ingeborg
--
Ingeborg Østrem Hellemo -- ingeborg.hellemo-***@public.gmane.org
Dep. of Information Technology --- Univ. of Tromsø
Loading...