Re: [Zope] strcoll_nocase gone after moving site?

2005-07-03 Thread Dieter Maurer
Daniel Dekany wrote at 2005-7-2 09:34 +0200:
Friday, July 1, 2005, 8:11:22 PM, Dieter Maurer wrote:

 Daniel Dekany wrote at 2005-6-30 22:28 +0200:
I have to move a Plone site to another server (from some FreeBSD to a
new Trustix), while also switching from Zope 2.7.x5 to 2.7.6, and from
Python 2.3.x5 to Python 2.3.5.

 Define locale in your Zope configuration file.

 Then locale should be imported when Zope is initialized.

It was/is set in the etc/zope.conf:

  locale hu_HU.UTF-8

And exactly this same locale works in C programs, so it is installed on
the OS.

Maybe, the import order has changed and sequence is now imported
before reading the config file (although that would be very astonishing).

Anyway, the if modules.has_key('locale') seems stupid.
Remove it and file a bug report.


-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] strcoll_nocase gone after moving site?

2005-07-02 Thread Daniel Dekany
Friday, July 1, 2005, 8:11:22 PM, Dieter Maurer wrote:

 Daniel Dekany wrote at 2005-6-30 22:28 +0200:
I have to move a Plone site to another server (from some FreeBSD to a
new Trustix), while also switching from Zope 2.7.x5 to 2.7.6, and from
Python 2.3.x5 to Python 2.3.5.

 Define locale in your Zope configuration file.

 Then locale should be imported when Zope is initialized.

It was/is set in the etc/zope.conf:

  locale hu_HU.UTF-8

And exactly this same locale works in C programs, so it is installed on
the OS.


-- 
Best regards,
 Daniel Dekany

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] strcoll_nocase gone after moving site?

2005-07-01 Thread Dieter Maurer
Daniel Dekany wrote at 2005-6-30 22:28 +0200:
I have to move a Plone site to another server (from some FreeBSD to a
new Trustix), while also switching from Zope 2.7.x5 to 2.7.6, and from
Python 2.3.x5 to Python 2.3.5.

Define locale in your Zope configuration file.

Then locale should be imported when Zope is initialized.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] strcoll_nocase gone after moving site?

2005-06-30 Thread Daniel Dekany
I have to move a Plone site to another server (from some FreeBSD to a
new Trustix), while also switching from Zope 2.7.x5 to 2.7.6, and from
Python 2.3.x5 to Python 2.3.5. I have built everything from source,
copied 1:1 the Products and Extension directory into a fresh new zope
instance, also imported the exported Plone site into it. Was this
procedure incorrect? Because till now the result is a disaster; things
that worked till now suddenly don't work anymore.

Anyway, this is what currently seems to win over me:

DocumentTemplate\sequence\SortEx.py line 172:

elif f_name in (locale_nocase, strcoll_nocase):
func = strcoll_nocase


And here global name 'strcoll_nocase' is not defined. I figured this
is because in the same file earlier, line 136:

import sys
if sys.modules.has_key(locale): # only if locale is already imported
from locale import strcoll

def strcoll_nocase(str1, str2):
return strcoll(str1.lower(), str2.lower())

and there the condition of the if is false. If I add

  import locale

before that if, then the error disappears.

Any idea what's going on? Why is the locale module be expected to be
already imported, and why is it not imported when it was on the other
server?

-- 
Best regards,
 Daniel Dekany

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )