You probably have two different versions of Python installed. And probably this is a 64-bit system at least in parts.

Check the python path cron uses and compare to the path the instance is run with.

HTH,

__Janko

Am 18.02.2009 um 11:37 schrieb Chris Withers:

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
_______________________________________________
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 )

Attachment: PGP.sig
Description: Signierter Teil der Nachricht

_______________________________________________
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 )

Reply via email to