On Wed, 22 Mar 2006, a blob of green gelatin wrote:

Maybe PyUnicodeUCS2_AsEncodedString is the culprit?.

RedHat 9 and SuSE 9 and later ship with UCS4 builds of Python and Zope, so please download the UCS4 versions of the product.

To find out which Python Unicode you have, please run the following command using the Python interpreter used by your Zope installation: |python -c "import sys; print (sys.maxunicode < 66000) and 'UCS2' or 'UCS4'"|

Hi again David (and jens 'n anyone else reading this thread),

I've solved the problem thanks to both of your input. I don't think this is a bug on anyone's part, but I do think it'd be something to add to a FAQ or the INSTALL.txt document in case others run into it like I do.

I found this URL (via googling for the PyUnicodeUCS2_AsEncodedString message) :

and these lines basically hit the nail on the head:

"this appears to revolve around the fact that suse 10 comes with python built as UCS4, and it appears that a default build of python is UCS2. since i would like to have suse maintain python installs i normally have yast update it. however, zope 3 wants 2.4.2 and suse build atm is at 2.4.1. thus i installed in local 2.4.2. (also this may be an issue with redhat from what i found on the egenix site)

the problem is that with one python doing UCS2 and the other doing UCS4 you can get in a situation where mx and psycopg are built oriented to, say for example UCS2 if you used the default build of 2.4.2. since the build doesn't check to see if the UCS is one or the other or that your using a different python this time for the install, then what python was used with current build. after you do the build once if you install for a 2nd python it uses the prior build and merrily installs the UCS2 oriented lib into the UCS4 python."

Now, I'm using Fedora Core 4 rather than SUSE, but it sure seemed appropriate. Funnily enough, the command you gave me to run and check the UCS I had run only on the system version, not the compiled version of python. I ran the command on my compiled version and sure enough, it showed UCS2 rather than UCS4 (which my system python had shown)!

So I had to recompile python 2.4.2 to include UCS4 support:
(./configure --enable-unicode=ucs4)

then recompile zope and voila! I'm now back on the INSTALL.txt roadmap! :)

One note:  The python README file for the 2.4.2 tarball states:

Red Hat Linux: Red Hat 9 built Python2.2 in UCS-4 mode and hacked
        Tcl to support it. To compile Python with Tkinter on these
        systems, you will need to pass --enable-unicode=ucs4 flag
        to ./configure. This is no longer needed in Fedora Core.

I'm probably reading it wrong (though I did have to install a tkinter rpm at some point a long time ago), but I can read it as saying you wouldn't need to pass this flag to 'configure' for fedora core because FC already enables UCS4. I specified the flag anyway and it seems to have done the trick.

Thanks again everyone!



Some people wear Superman pajamas. Superman wears Chuck Norris pajamas.

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

Reply via email to