Hi there, are there any known problems with zope 2.5.0 and locale module? This piece of code [1] produces an error when I try to refresh/install a product that contains the code, though it works just fine if I just execute it in the python shell. The same product works well in zope 2.4.2... [1]: import locale locale.setlocale(locale.LC_ALL, '') error returned: Traceback (innermost last): File /usr/lib/zope/lib/python/App/RefreshFuncs.py, line 183, in performSafeRefresh File /usr/lib/zope/lib/python/App/RefreshFuncs.py, line 170, in performRefresh File /usr/lib/zope/lib/python/OFS/Application.py, line 758, in reimport_product File /usr/lib/zope/lib/python/OFS/Application.py, line 531, in import_product File /usr/lib/zope/lib/python/Products/SPIntranet/__init__.py, line 60, in ? File /usr/lib/zope/lib/python/Products/SPIntranet/SPIntranetBaseFolder.py, line 74, in ? File /usr/lib/zope/lib/python/Products/SPIntranet/SPIntranetBaseDocument.py, line 129, in ? File /usr/lib/python2.1/locale.py, line 374, in setlocale Error: locale setting not supported Python version: 2.1.2 Any hints greatly appreciated. regards, Igor
Hi, You shouldn't be messing with locale in a Zope product. In a threaded Python app, setting locale affects all threads, and there are a number of parts in Zope which depend on correct locale information. You should respect whatever locale was set in Zope initialization (by environment vars or thru the -L parameter) Why do you want to change the locale anyway? On Fri, 2002-02-08 at 12:33, Igor Stroh wrote:
are there any known problems with zope 2.5.0 and locale module? This piece of code [1] produces an error when I try to refresh/install a product that contains the code, though it works just fine if I just execute it in the python shell. The same product works well in zope 2.4.2...
[1]:
import locale locale.setlocale(locale.LC_ALL, '')
-- Ideas don't stay in some minds very long because they don't like solitary confinement.
participants (2)
-
Igor Stroh -
Leonardo Rochael Almeida