Michael McKerns
mmckerns at its.caltech.edu
Thu Jun 26 20:31:36 EST 2003
I think the error here has something to do with PyXML or 4Suite, so this probably isn't an error caused by mod_python, but I don't know where else to try. I tried the Python XML-SIG list, and I was told that this is a common error, and I should ask here. So here I am... Anyone recognize this error? ----- Begin Forwarded Message ----- I'm working on a distributed computing project, and I'm trying to port the server we built to another computer. On the current server, our this test code works -- on the new machine it fails... Apache tests pass, & mod_python tests pass. I get failures on some of the 4Suite tests. Any help or advice I can get is greatly appreciated. Thanks. OS/BUILD INFO: (NEW) (OLD) --------------------------------------------- Red Hat Linux 8.0 3.2-7 Red Hat Linux 7.1 2.96-85 Python 2.2.2-7 Python 2.2.1 PyXML 0.8.2 (without xslt & xpath) PyXML 0.8.0 (with xslt & xpath) 4Suite 1.0a1 4Suite 0.10.1-1 httpd 2.0.40-11.5 apache 1.3.22-5.7.1 mod_python 3.0.3 mod_python 2.7.1-1 pycrypto 1.9a6 pycrypto 1.9a3 xmlrpclib 1.0.1 xmlrpclib 1.0.1 jonpy 0.05 jonpy 0.04 --------------------------------------------- TEST CODE: --------------------------------------------- #! /usr/bin/env python ################################# # pyweb.py # testing python web handler ################################# import jon.session as session import jon.cgi import jon.modpy as modpy import xmlrpclib import sys # without the next line, this test works. from xml.dom.ext.reader.Sax2 import FromXml from mod_python import apache def handler(req): req.content_type = "text/plain" req.write("Hello World Wide Web!") return apache.OK --------------------------------------------- CHANGES TO HTTPD.CONF --------------------------------------------- LoadModule python_module modules/mod_python.so <Directory /home/mmckerns/public_html> AddHandler python-program .py PythonHandler pyweb PythonPath "sys.path+['/home/mmckerns/public_html']" PythonDebug On </Directory> --------------------------------------------- ERRORS PRODUCED: --------------------------------------------- Mod_python error: "PythonHandler pyweb" Traceback (most recent call last): File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 320, in HandlerDispatch module = import_module(module_name, config) File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 499, in import_module module = imp.load_module(mname, f, p, d) File "/home/mmckerns/public_html/pyweb.py", line 9, in ? from xml.dom.ext.reader.Sax2 import FromXml File "/usr/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/__init__.py", line 21, in ? encoder = codecs.lookup("utf-8")[0] # encode,decode,reader,writer File "/var/tmp/python-2.2.2-root/usr/lib/python2.2/encodings/__init__.py", line 51, in search_function RuntimeError: cannot unmarshal code objects in restricted execution mode --------------------------------------------- Please speak slowly, so even I can understand... I'm Mat.Sci., not Comp.Sci. --- Mike McKerns Caltech Materials Science mmckerns at caltech.edu
|