ImportError: No module named i18n.normalizer.interfaces
December 2018
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
About
This site is an effort to share some of the base knowledge I have gathered through all this years working with Linux, FreeBSD, OpenBSD, Python or Zope, among others. So, take a look around and I hope you will find the contents useful.
Recent Entries
Recent Comments
Recent Trackbacks
Categories
OpenBSD (9 items)
BSD (0 items)
FreeBSD (19 items)
Linux (3 items)
Security (3 items)
Python (22 items)
Zope (13 items)
Daily (144 items)
e-shell (9 items)
Hacks (14 items)
PostgreSQL (3 items)
OSX (8 items)
Nintendo DS (0 items)
enlightenment (0 items)
Apache (3 items)
Nintendo Wii (1 items)
Django (24 items)
Music (12 items)
Plone (7 items)
Varnish (0 items)
Lugo (2 items)
Sendmail (0 items)
europython (7 items)
Cherokee (1 items)
self (1 items)
Nature (1 items)
Hiking (0 items)
uwsgi (0 items)
nginx (0 items)
cycling (10 items)
Networking (1 items)
DNS (0 items)
Archives

Syndicate this site (XML)

RSS/RDF 0.91

04 marzo
2009

ImportError: No module named i18n.normalizer.interfaces

this one was hard to solve...

Today I've found one of those ugly problems that took me some time to resolve. In one of my servers I've a Zope instance that was created using a Zope install from the FreeBSD ports collection (pretty useful if you only need plain Zope, as it was my case). Since I installed such version of Zope, I've added a plone "production" buildout to the same server and everything was running smoothly... until I had to restart my original Zope instance (which, yes, has an old plone site inside too). Zope restarted correctly, but when trying to access the plone site, I got a message about the plone site being broken... wtf?.

I took a look over the event.log file of the Zope instance, and I found this error:

ImportError: No module named i18n.normalizer.interfaces

Pretty strange... but seems I wasn't the first one with this problem. In the end it was a path-related problem, as the python process running Zope was picking up some modules from the site-packages directory, instead of the instance lib/python directory.

Final solution?, easy, I just modified my zopectl script to get something like:

#! /bin/sh

PYTHON="/usr/local/bin/python2.4"
ZOPE_HOME="/usr/local/www/Zope210"
INSTANCE_HOME="/usr/local/www/zope2105"
CONFIG_FILE="/usr/local/www/zope2105/etc/zope.conf"
SOFTWARE_HOME="/usr/local/www/Zope210/lib/python"
PLONE_SOFTWARE_HOME="$INSTANCE_HOME/lib/python"
PYTHONPATH="$SOFTWARE_HOME:$PLONE_SOFTWARE_HOME:$PYTHONPATH"
export PYTHONPATH INSTANCE_HOME SOFTWARE_HOME

ZDCTL="$SOFTWARE_HOME/Zope2/Startup/zopectl.py"

exec "$PYTHON" "$ZDCTL" -C "$CONFIG_FILE" "$@"

Setting PLONE_SOFTWARE_HOME and adding it to the PYTHONPATH var.

(of course I should have moved the plone site into the buildout, but that is another story...)

Posted by wu at 16:06 | Comments (0) | Trackbacks (0)
<< Poll: your oppinion about the best setup... | Main | Aupa! >>
Comments
There are no comments.
Trackbacks
Please send trackback to:http://blog.e-shell.org/144/tbping
There are no trackbacks.
Post a comment