Hello,
After upgrading my system to NAV 3.4.0 (apt-get dist-upgrade) I get the following error when searching for a random device on the new IP Device Info feature:
Mod_python error: "PythonHandler django.core.handlers.modpython"
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req)
File "/var/lib/python-support/python2.4/django/core/handlers/modpython.py", line 189, in handler return ModPythonHandler()(req)
File "/var/lib/python-support/python2.4/django/core/handlers/modpython.py", line 162, in __call__ response = self.get_response(request)
File "/var/lib/python-support/python2.4/django/core/handlers/base.py", line 132, in get_response return callback(request, **param_dict)
File "/var/lib/python-support/python2.4/django/views/defaults.py", line 89, in server_error t = loader.get_template(template_name) # You need to create a 500.html template.
File "/var/lib/python-support/python2.4/django/template/loader.py", line 79, in get_template source, origin = find_template_source(template_name)
File "/var/lib/python-support/python2.4/django/template/loader.py", line 72, in find_template_source raise TemplateDoesNotExist, name
TemplateDoesNotExist: 500.html
Any ideas what this might be?
Oh, when looking at the new Netmap beta, it also turns out to be blank every time :(
Any help appreciated!
------------------------------------------------------ Vidar Stokkenes Konsulent Nettverk Seksjon for nettverk og telekom HN IKT - Tromsø
Tlf: 76 16 61 87 / 77 66 99 55 Mobil: 95 87 99 42 e-post: vidar.stokkenes@hn-ikt.nomailto:vidar.stokkenes@hn-ikt.no [cid:image001.png@01C8CF8E.64014690]
I don't know how many error-reports you want about the beta Ip Device Info feature?
I've got the same error as Vidar on FreeBSD (with some additional info):
MOD_PYTHON ERROR
ProcessId: 46292 Interpreter: 'po.uit.no'
ServerName: 'po.uit.no' DocumentRoot: '/usr/local/nav/apache/webroot'
URI: '/ipdevinfo/kahuka.cc.uit.no/' Location: None Directory: '/usr/local/nav/apache/webroot/ipdevinfo/' Filename: '/usr/local/nav/apache/webroot/ipdevinfo/kahuka.cc.uit.no' PathInfo: '/'
Phase: 'PythonHandler' Handler: 'django.core.handlers.modpython'
Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent)
File "/usr/local/lib/python2.4/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg)
File "/usr/local/lib/python2.4/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg)
File "/usr/local/lib/python2.4/site-packages/django/core/handlers/modpython.p y", line 189, in handler return ModPythonHandler()(req)
File "/usr/local/lib/python2.4/site-packages/django/core/handlers/modpython.p y", line 162, in __call__ response = self.get_response(request)
File "/usr/local/lib/python2.4/site-packages/django/core/handlers/base.py", line 135, in get_response return callback(request, **param_dict)
File "/usr/local/lib/python2.4/site-packages/django/views/defaults.py", line 89, in server_error t = loader.get_template(template_name) # You need to create a 500.html template.
File "/usr/local/lib/python2.4/site-packages/django/template/loader.py", line 80, in get_template source, origin = find_template_source(template_name)
File "/usr/local/lib/python2.4/site-packages/django/template/loader.py", line 73, in find_template_source raise TemplateDoesNotExist, name
TemplateDoesNotExist: 500.html
I do find a 500.html-template in /usr/local/lib/python2.4/site-packages/django/ contrib/admin/templates/admin/500.html.
Am I missing some soft-links or flags during installation of django?
Second question is why django is trying to return an error in the first place. Perhaps the attached error message means something to somebody?
--Ingeborg
According to Kristian Klette, this error has been fixed in the non-test version of the 3.4.0 release (to be called 3.4.1) You can bypass this error by removing the following line in the "/usr/local/nav/lib/python/nav/models/manage.py" file:
community_suffix = models.CharField(max_length=-1)
(line 268)
Although when I remove this line, I get another error saying "column vendor.enterpriseid does not exist".
Ideas?
/V
-----Opprinnelig melding----- Fra: Ingeborg Hellemo [mailto:Ingeborg.Hellemo@cc.uit.no] Sendt: 16. juni 2008 10:17 Til: nav-users@uninett.no Emne: Re: The new IP device Info interface (django based) fails
I don't know how many error-reports you want about the beta Ip Device Info feature?
I've got the same error as Vidar on FreeBSD (with some additional info):
MOD_PYTHON ERROR
ProcessId: 46292 Interpreter: 'po.uit.no'
ServerName: 'po.uit.no' DocumentRoot: '/usr/local/nav/apache/webroot'
URI: '/ipdevinfo/kahuka.cc.uit.no/' Location: None Directory: '/usr/local/nav/apache/webroot/ipdevinfo/' Filename: '/usr/local/nav/apache/webroot/ipdevinfo/kahuka.cc.uit.no' PathInfo: '/'
Phase: 'PythonHandler' Handler: 'django.core.handlers.modpython'
Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent)
File "/usr/local/lib/python2.4/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg)
File "/usr/local/lib/python2.4/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg)
File "/usr/local/lib/python2.4/site-packages/django/core/handlers/modpython.p y", line 189, in handler return ModPythonHandler()(req)
File "/usr/local/lib/python2.4/site-packages/django/core/handlers/modpython.p y", line 162, in __call__ response = self.get_response(request)
File "/usr/local/lib/python2.4/site-packages/django/core/handlers/base.py", line 135, in get_response return callback(request, **param_dict)
File "/usr/local/lib/python2.4/site-packages/django/views/defaults.py", line 89, in server_error t = loader.get_template(template_name) # You need to create a 500.html template.
File "/usr/local/lib/python2.4/site-packages/django/template/loader.py", line 80, in get_template source, origin = find_template_source(template_name)
File "/usr/local/lib/python2.4/site-packages/django/template/loader.py", line 73, in find_template_source raise TemplateDoesNotExist, name
TemplateDoesNotExist: 500.html
I do find a 500.html-template in /usr/local/lib/python2.4/site-packages/django/ contrib/admin/templates/admin/500.html.
Am I missing some soft-links or flags during installation of django?
Second question is why django is trying to return an error in the first place. Perhaps the attached error message means something to somebody?
--Ingeborg -- Ingeborg Østrem Hellemo -- ingeborg@cc.uit.no (Univ. of Tromsø, Norway)
According to Kristian Klette, this error has been fixed in the non-test version of the 3.4.0 release (to be called 3.4.1) You can bypass this error by removing the following line in the "/usr/local/nav/lib/python/nav/models/manage.py" file:
community_suffix = models.CharField(max_length=-1)
(line 268)
This should fix that particular error, yes.
Although when I remove this line, I get another error saying "column vendor.enterpriseid does not exist".
Ideas?
This seems to be the same kind of error, only on a different model
Remove the line "enterprise_id = models.IntegerField(db_column='enterpriseid')" from /usr/local/nav/lib/python/nav/models/manage.py. Its on line 461 (or around there somewhere ;-) )
To recap whats causing these errors; The current django-models where created by introspecting (and some manual labour) our in-house development database, so it accidently got some experimental fields with it. Django applications using the select_related()-command on querysets fails because it cant find every field in the model in the actual database. So; if you encouter more of these errors, just delete the corresponing line from the manage.py file, and send us an email or report it on sourceforge (email is probably faster than that old behemoth though ;-)
And for people getting and error about a missing 500.html template, please enable django-debugging by making sure DEBUG is set to True in /usr/local/nav/lib/python/nav/django/settings.py
- Kristian Klette
Thanks for the info.
I might also add (typically for the scandinavian NAV users) that the new device info does not support non-english characters, if our case æ/ø/å in any fields. In this case, I had to remove these characters from the description of our Organization.
After removing the mentioned line, the new beta of IP Device info seems to work just fine, atleast here (on Debian)
Vidar.
-----Opprinnelig melding----- Fra: Kristian Klette [mailto:kristian.klette@uninett.no] Sendt: 16. juni 2008 11:04 Til: nav-users@uninett.no; Stokkenes Vidar Emne: Re: The new IP device Info interface (django based) fails
According to Kristian Klette, this error has been fixed in the non-test version of the 3.4.0 release (to be called 3.4.1) You can bypass this error by removing the following line in the "/usr/local/nav/lib/python/nav/models/manage.py" file:
community_suffix = models.CharField(max_length=-1)
(line 268)
This should fix that particular error, yes.
Although when I remove this line, I get another error saying "column vendor.enterpriseid does not exist".
Ideas?
This seems to be the same kind of error, only on a different model
Remove the line "enterprise_id = models.IntegerField(db_column='enterpriseid')" from /usr/local/nav/lib/python/nav/models/manage.py. Its on line 461 (or around there somewhere ;-) )
To recap whats causing these errors; The current django-models where created by introspecting (and some manual labour) our in-house development database, so it accidently got some experimental fields with it. Django applications using the select_related()-command on querysets fails because it cant find every field in the model in the actual database. So; if you encouter more of these errors, just delete the corresponing line from the manage.py file, and send us an email or report it on sourceforge (email is probably faster than that old behemoth though ;-)
And for people getting and error about a missing 500.html template, please enable django-debugging by making sure DEBUG is set to True in /usr/local/nav/lib/python/nav/django/settings.py
- Kristian Klette
-- Mvh Kristian Klette «Programs for sale: Fast, Reliable, Cheap: choose two.»
Vidar.Stokkenes@hn-ikt.no said:
I might also add (typically for the scandinavian NAV users) that the new device info does not support non-english characters, if our case æ/ø/å in any fields. In this case, I had to remove these characters from the description of our Organization.
We observe the same thing (Børge is not very happy...):
UnicodeDecodeError at /ipdevinfo/ 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) Request Method: GET Request URL: https://nav.uit.no/ipdevinfo/ Exception Type: UnicodeDecodeError Exception Value: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) Exception Location: /usr/local/lib/python2.4/site-packages/Cheetah-2.0.1-py2.4-freebsd-6.3-RELEASE- p1-i386.egg/Cheetah/DummyTransaction.py in getvalue, line 32 Python Executable: /usr/local/bin/python Python Version: 2.4.4 Python Path: ['/usr/local/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg', '/usr/local/lib/python2.4/site-packages/Cheetah-2.0.1-py2.4-freebsd-6.3-RELEASE -p1-i386.egg', '/usr/local/nav/lib/python', '/usr/local/lib/python24.zip', '/usr/local/lib/python2.4', '/usr/local/lib/python2.4/plat-freebsd6', '/usr/local/lib/python2.4/lib-tk', '/usr/local/lib/python2.4/lib-dynload', '/usr/local/lib/python2.4/site-packages', '/usr/local/lib/python2.4/site-packages', '/usr/local/nav/apache/webroot/.', '/usr/local/nav/lib/python', '/usr/local/nav/apache/webroot/ipdevinfo', '/usr/local/nav/lib/python', '/usr/local/nav/apache/webroot/report', '/usr/local/nav/lib/python', '/usr/local/nav/apache/webroot/browse', '/usr/local/nav/lib/python', '/usr/local/nav/apache/webroot/editdb', '/usr/local/nav/lib/python', '/usr/local/nav/apache/webroot/machinetracker', '/usr/local/nav/lib/python', '/usr/local/nav/apache/webroot/toolbox', '/usr/local/nav/lib/python'] Server time: Mon, 16 Jun 2008 06:49:40 -0500 Unicode error hint
The string that could not be encoded/decoded was: B??rge
--Ingeborg