On Wed, 5 Mar 2008 11:22:39 +0800 "komang adi" untukta@gmail.com wrote:
i have installed NAV 3.3.2 on Ubuntu 7.10, but when i want to see the status there is an error. The error like this :
[snip]
File "/usr/local/nav/apache/webroot/status/StatusPrefs.py", line 325, in loadPrefs prefs = cPickle.loads(data)
ImportError: No module named _mp_37bf19280ab45e11f34ffeed40ee4974
MODULE CACHE DETAILS
Accessed: Wed Mar 5 10:19:45 2008 Generation: 11
_mp_37bf19280ab45e11f34ffeed40ee4974 { FileName: '/usr/local/nav/apache/webroot/status/StatusPrefs.py' Instance: 1 [IMPORT] Generation: 13 Modified: Tue Mar 4 17:40:15 2008 Imported: Wed Mar 5 10:19:45 2008 Children: '/usr/local/nav/apache/webroot/status/StatusSections.py' }
Ouch. While I've never seen this one before, a quick Google search turned up this:
http://www.dscpl.com.au/wiki/ModPython/Articles/IssuesWithSessionObjects
Apparently, the module import mechanism has been changed in newer versions of mod_python (such as 3.3, which is present on Ubuntu 7.10). The way in which the status page stores each user's status page preferences will evidently no longer work under mod_python, and that's why you're seeing this error :-(
Our dev server still has mod_python 3.2, and we've not seen this issue there, so it apparently occurs only on mod_python 3.3 and newer.
Unfortunately, I have no certain quick fix for you. I will have to figure out whether this can be worked around, or whether we need to rewrite the way in which the Status page stores preferences. I'll see if I can get my hands on mod_python 3.3 to reproduce the error.
You may however be able to workaround this issue if you can downgrade your mod_python version to 3.2. It is likely that the mod_python package from Ubuntu 7.04 (feisty) is still compatible with 7.10 (gutsy) and can be installed. If you are able to do this, you may also need to purge the stored status preferences from the NAV database. That can be accomplished by running 'psql navprofiles nav', using the database password from /usr/local/nav/etc/db.conf, and then running the following SQL statement:
DELETE FROM accountproperty WHERE property='statusprefs';
On Wed, 26 Mar 2008 13:39:09 +0100 Morten Brekkevold morten.brekkevold@uninett.no wrote:
You may however be able to workaround this issue if you can downgrade your mod_python version to 3.2. It is likely that the mod_python package from Ubuntu 7.04 (feisty) is still compatible with 7.10 (gutsy) and can be installed. If you are able to do this, you may also need to purge the stored status preferences from the NAV database. That can be accomplished by running 'psql navprofiles nav', using the database password from /usr/local/nav/etc/db.conf, and then running the following SQL statement:
DELETE FROM accountproperty WHERE property='statusprefs';
If you don't care about configuring your own special set of status preferences, it looks like you can workaround the problem just by purging the preferences from the database, as described above.
No preferences will be saved to the database unless you explicitly press the Save button in the status page preferences form.