-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Marco Bizzarri wrote: > On Wed, Feb 18, 2009 at 12:00 PM, Chris Withers <ch...@simplistix.co.uk> > wrote: >> Chris Withers wrote: >>> ImportError: /usr/lib/zope2.9/lib/python/persistent/cPersistence.so: >>> undefined symbol: PyUnicodeUCS4_AsEncodedString >>> ImportError: /opt/Zope-2.9/lib/python/persistent/cPersistence.so: >>> undefined symbol: PyUnicodeUCS2_AsEncodedString >> Having had a bit of a google, I found this post from Andreas: >> >> http://mail.zope.org/pipermail/zope3-users/2006-June/003791.html >> >> So it seems that "python2.4" resolves to one python when cron is running >> and another when run from a shell of the same user. >> >> Has anyone seen this behaviour before or know what could cause it? >> >> cheers, >> >> Chris >> >> PS: I've solved this for now by changing python2.4 to >> /usr/local/bin/python2.4 in the control scripts, which seems to have >> done the trick. >> >> -- >> Simplistix - Content Management, Zope & Python Consulting >> - http://www.simplistix.co.uk > > Is it possible that you've something in your .bash_profile or .bashrc > which manipulates the PATH environment variable? > > The behaviour could be explained because cron could define and execute > your script using /bin/sh as the shell. Even though that one is a sym > or an hard link to /bin/bash, bash could behave like sh and not > reading the .bashrc or .bash_profile scripts before starting.
Yup. In fact, this is why battle-scarred sysadmins always use fully-qualified paths in scripts meant to be run from cron, as well as in the crontab itself. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJnEgV+gerLs4ltQ4RAl51AJ9isWVwl7Km7R4gGCVCBQ8Nc8SwRwCgvRXm 1BfLu4pi2wsvE3Bw869KN3M= =wker -----END PGP SIGNATURE----- _______________________________________________ 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 )