New error with Python/Pylons

software development

#1

I’ve had a couple of Pylons/Python web apps running for a while now. They seem to have both failed suddenly last week.
No clear error in the error logs, but when I try and import the fcgi script in python I get this error message:

File “dispatch.fcgi”, line 4, in ?
from fcgi import WSGIServer
File “/home/dave_e/lib/python2.4/site-packages/fcgi.py”, line 68, in ?
import dummy_threading as threading
File “/home/dave_e/lib/python2.4/dummy_threading.py”, line 50, in ?
import threading
File “/home/dave_e/lib/python2.4/threading.py”, line 13, in ?
from collections import deque
ImportError: /home/dave_e/lib/python2.4/lib-dynload/collections.so: undefined symbol: _PyArg_NoKeywords

It seems like this is some change of the server setup, has anyone else experienced this?

Thanks,
Dave

Dave


#2

I noticed this too for my version of bzr I use to manage my site.

I could get around it by LD_PRELOADing libpython.

Ex: LD_PRELOAD=/usr/lib/libpython2.4.so.1.0 bzr update

From what I read it sounds like it may have changed the Unicode compile setting (I hope this is fixed in Python 3.0)


#3

Hmm, I’ve had some success with that I can run a test HelloWorld fcgi script like this:

LD_PRELOAD=/usr/lib/libpython2.4.so.1.0 hello.fcgi

but that won’t work for running the web app. I don’t understand how Dreamhost could have changed something that effects my virtual python installation?

Is this something that they should fix? Or I should have to work around?

Thanks for the reply.

Dave


#4

I am getting the same thing with my web site.

Is there a workaround / update on this issue?


#5

I issued a ticket to support and got the following back:


I went ahead and checked with a supervisor and he states the issue has to
do with you loading the collections.so from within your home directory:

/home/kzinti/lib/python2.4/lib-dynload/collections.so

The other customer having this issue is doing similarly:

/home/dave_e/lib/python2.4/lib-dynload/collections.so

I suspect it may be a problem with the script or some custom library both
of you are using, so you may want to try contacting the developers of
either for any further questions.

As far as I know, nothing with our Python configuration has changed
anytime recently. However, please let me know if there’s anything further
I can do to assist you.

Thanks!

It sounds like having our own (virtual) python is the problem. But then I need 2.4 and Dreamhost only provides 2.3. Any ideas?