[Zope] Weird "undefined symbol: PyUnicodeUCS{2|4}_AsEncodedString" errors

Chris Withers chris at simplistix.co.uk
Wed Feb 18 05:37:12 EST 2009


Hi All,

I wonder if anyone has seen errors like these before...

Scenario is as follows, two Zope instances and a zeo server all running 
from the debian zope2.9 packages. All the control scripts for these 
instances fail with the following error when used:

Traceback (most recent call last):
   File "/usr/lib/zope2.9/lib/python/Zope2/Startup/zopectl.py", line 
322, in ?
     main()
...
   File "/usr/lib/zope2.9/lib/python/persistent/__init__.py", line 19, in ?
     from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY
ImportError: /usr/lib/zope2.9/lib/python/persistent/cPersistence.so: 
undefined symbol: PyUnicodeUCS4_AsEncodedString

However, when run as a cron job as follows:

@daily /var/lib/zope2.9/instance/x/bin/zopectl run 
/var/lib/zope2.9/instance/x/Products/Stepper/run.py -q / jobs

...the control scripts behave properly and the stepper jobs get run.

To solve the problem, I built python from source and installed the 
latest Zope 2.9 from source.

Now, all the instances behave fine, except the above cron job now fails 
with the following:

Traceback (most recent call last):
   File "/opt/Zope-2.9/lib/python/Zope2/Startup/zopectl.py", line 334, in ?
     exitstatus = main()
...
File "/opt/Zope-2.9/lib/python/persistent/__init__.py", line 19, in ?
     from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY
ImportError: /opt/Zope-2.9/lib/python/persistent/cPersistence.so: 
undefined symbol: PyUnicodeUCS2_AsEncodedString

So, the problem seems inverted now and the error is about UCS2 rather 
than UCS4.

Anyone ever seen anything like this? What is that symbol and why would 
it be there when run from a shell and not there when run from cron?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope mailing list