Problem with mod_python/3.3.1 and apache
Hello, im using Apache HTTPD 2.2.8 with mod_python/3.3.1 Python/2.4.3 on Windows and having truble starting pythone, any help would be appreciated . Im getting this error: [Mon Mar 31 23:53:03 2008] [error] make_obcallback: could not import mod_python.apache.\n 'import site' failed; use -v for traceback 'import site' failed; use -v for traceback ImportError: No module named mod_python.apache [Mon Mar 31 23:53:03 2008] [error] make_obcallback: Python path being used ['C:Windowssystem32python24.zip', '', 'c:xampp\\\ \pythonDLLs', 'c:xampppythonlib', 'c:xampp\\\ \pythonlibplat-win', 'c:xampppythonliblib-tk', 'C:xamppapachebin']. [Mon Mar 31 23:53:03 2008] [error] get_interpreter: no interpreter callback found. [Mon Mar 31 23:53:03 2008] [error] [client 127.0.0.1] python_handler: Can't get/create interpreter., referer: http://localhost/python/ [Mon Mar 31 23:53:25 2008] [error] make_obcallback: could not import mod_python.apache.\n ImportError: No module named mod_python.apache thx -- http://mail.python.org/mailman/listinfo/python-list
Re: Problem with mod_python/3.3.1 and apache
On Apr 1, 8:03 am, NccWarp9 [EMAIL PROTECTED] wrote: Hello, im using Apache HTTPD 2.2.8 with mod_python/3.3.1 Python/2.4.3 on Windows and having truble starting pythone, any help would be appreciated . Im getting this error: [Mon Mar 31 23:53:03 2008] [error] make_obcallback: could not import mod_python.apache.\n 'import site' failed; use -v for traceback 'import site' failed; use -v for traceback ImportError: No module named mod_python.apache [Mon Mar 31 23:53:03 2008] [error] make_obcallback: Python path being used ['C:Windowssystem32python24.zip', '', 'c:xampp\\\ \pythonDLLs', 'c:xampppythonlib', 'c:xampp\\\ \pythonlibplat-win', 'c:xampppythonliblib-tk', 'C:xamppapachebin']. [Mon Mar 31 23:53:03 2008] [error] get_interpreter: no interpreter callback found. [Mon Mar 31 23:53:03 2008] [error] [client 127.0.0.1] python_handler: Can't get/create interpreter., referer:http://localhost/python/ [Mon Mar 31 23:53:25 2008] [error] make_obcallback: could not import mod_python.apache.\n ImportError: No module named mod_python.apache thx See: http://www.modpython.org/pipermail/mod_python/2008-March/025022.html Also search the www.modpython.org site for other discussions/ suggestions in the mod_python mailing list. Graham -- http://mail.python.org/mailman/listinfo/python-list
Re: problem with mod_python
Pradnyesh Sawant wrote: Hello, I have a small program which does 'import hashlib'. This program runs fine with python2.5. But when I try running the same program through mod_python, I get the error: 'ImportError: No module named hashlib' in the apache2 error.log Searching online suggested me to include md5.so or md5module.so in apache2. but I don't see that in a package for debian lenny (the system I'm using). So, my Q is, is it possible to make mod_python use the same PYTHONPATH as the python2.5 interpreter? if so, how? It sounds like your mod_python may be compiled against a different version of Python than your main installation? How did you install mod_python? How did you install your main python installation? What is the output of the command: ldd /path/to/mod_python.so (the full path on my system is /usr/lib/apache2/mod_python.so) There should be a line something like: libpython2.5.so.1.0 = /usr/lib/libpython2.5.so.1.0 (0xb7e37000) If it is pointing to libpython.2.4.so.1.0, then that could be the reason for you troubles. Hope that helps. j -- http://mail.python.org/mailman/listinfo/python-list
Re: problem with mod_python
On Feb 20, 6:04 am, Joshua Kugler [EMAIL PROTECTED] wrote: Pradnyesh Sawant wrote: Hello, I have a small program which does 'import hashlib'. This program runs fine with python2.5. But when I try running the same program through mod_python, I get the error: 'ImportError: No module named hashlib' in the apache2 error.log Searching online suggested me to include md5.so or md5module.so in apache2. but I don't see that in a package for debian lenny (the system I'm using). So, my Q is, is it possible to make mod_python use the same PYTHONPATH as the python2.5 interpreter? if so, how? It sounds like your mod_python may be compiled against a different version of Python than your main installation? How did you install mod_python? How did you install your main python installation? What is the output of the command: ldd /path/to/mod_python.so (the full path on my system is /usr/lib/apache2/mod_python.so) There should be a line something like: libpython2.5.so.1.0 = /usr/lib/libpython2.5.so.1.0 (0xb7e37000) If it is pointing to libpython.2.4.so.1.0, then that could be the reason for you troubles. The ldd trick only works if the Python version being used actually supplied a shared library and mod_python was able to link against it, otherwise a static version of Python is embedded in mod_python. Some Linux distributions still possibly don't provide a shared library for Python, or don't correctly symlink the .so into the Python config directory along side the .a so that linkers will find it correctly when -L for config directory is used. This has in part been the fault of Python itself as build from source doesn't necessarily do that symlink. Not sure if this has changed in more recent Python versions. Graham -- http://mail.python.org/mailman/listinfo/python-list
Re: problem with mod_python
On Feb 17, 3:29 pm, Pradnyesh Sawant [EMAIL PROTECTED] wrote: Hello, I have a small program which does 'import hashlib'. This program runs fine with python2.5. But when I try running the same program through mod_python, I get the error: 'ImportError: No module named hashlib' in the apache2 error.log Searching online suggested me to include md5.so or md5module.so in apache2. but I don't see that in a package for debian lenny (the system I'm using). So, my Q is, is it possible to make mod_python use the same PYTHONPATH as the python2.5 interpreter? if so, how? any other suggestions to solve the above problem are welcome too. thanks! Your mod_python isn't compiled against Python 2.5 but is using an older version. You will need to rebuild mod_python to use Python 2.5 instead. You cannot just point mod_python at the Python 2.5 module directories as they are incompatible. Graham -- http://mail.python.org/mailman/listinfo/python-list
Re: problem with mod_python
On 02:07, 17Feb2008, Graham Dumpleton wrote: On Feb 17, 3:29 pm, Pradnyesh Sawant wrote: Hello, Your mod_python isn't compiled against Python 2.5 but is using an older version. You will need to rebuild mod_python to use Python 2.5 instead. You cannot just point mod_python at the Python 2.5 module directories as they are incompatible. Thanks a lot! You were correct in pointing out the problem. I've found out that hashlib is present in python2.5, and not in python2.4. I've decided to go with python2.4, for the present, and use 'md5' instead of 'hashlib.md5'. thanks again! Graham -- http://mail.python.org/mailman/listinfo/python-list -- warm regards, Pradnyesh Sawant -- We are not just our behaviour. We are the person managing our behaviour. --The One Minute Manager signature.asc Description: Digital signature -- http://mail.python.org/mailman/listinfo/python-list
problem with mod_python
Hello, I have a small program which does 'import hashlib'. This program runs fine with python2.5. But when I try running the same program through mod_python, I get the error: 'ImportError: No module named hashlib' in the apache2 error.log Searching online suggested me to include md5.so or md5module.so in apache2. but I don't see that in a package for debian lenny (the system I'm using). So, my Q is, is it possible to make mod_python use the same PYTHONPATH as the python2.5 interpreter? if so, how? any other suggestions to solve the above problem are welcome too. thanks! -- warm regards, Pradnyesh Sawant -- We are not just our behaviour. We are the person managing our behaviour. --The One Minute Manager signature.asc Description: Digital signature -- http://mail.python.org/mailman/listinfo/python-list
Re: problem with mod_python
Pradnyesh Sawant wrote: Hello, Hi [...] So, my Q is, is it possible to make mod_python use the same PYTHONPATH as the python2.5 interpreter? if so, how? You can use the PythonPath directive to set the PYTHONPATH to whatever you want any other suggestions to solve the above problem are welcome too. thanks! Have you tried the mod_python mailing list? (see http://www.modpython.org/) -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list
PROBLEM with MOD_PYTHON
I don't understand this error , in the (Apache) errorlog I read this message : [Sat Oct 28 14:04:03 2006] [error] make_obcallback: could not import mod_python.apache.\n [Sat Oct 28 14:04:03 2006] [error] make_obcallback: Python path being used ['C:Python24python24.zip', '.DLLs', '.lib', '.libplat-win', '.liblib-tk', 'C:ProgrammiApache GroupApache2bin']. [Sat Oct 28 14:04:03 2006] [error] python_handler: no interpreter callback found. [Sat Oct 28 14:04:03 2006] [error] [client 127.0.0.1] python_handler: Can't get/create interpreter. I have Apache/2.0.59 (Win32) mod_python/3.2.10 Python/2.4.3 I have read all the manuals, but I don't understand where I am wrong. thanks so much Marco. -- http://mail.python.org/mailman/listinfo/python-list
Re: PROBLEM with MOD_PYTHON
dan84 [EMAIL PROTECTED] writes: I don't understand this error , in the (Apache) errorlog I read this message : [Sat Oct 28 14:04:03 2006] [error] make_obcallback: could not import mod_python.apache.\n [Sat Oct 28 14:04:03 2006] [error] make_obcallback: Python path being used ['C:Python24python24.zip', '.DLLs', '.lib', '.libplat-win', '.liblib-tk', 'C:ProgrammiApache GroupApache2bin']. [Sat Oct 28 14:04:03 2006] [error] python_handler: no interpreter callback found. [Sat Oct 28 14:04:03 2006] [error] [client 127.0.0.1] python_handler: Can't get/create interpreter. I have Apache/2.0.59 (Win32) mod_python/3.2.10 Python/2.4.3 I have read all the manuals, but I don't understand where I am wrong. thanks so much Marco. Even if there is nothing Apache specific, doesn't it look odd that the path has 4 backslashes? Even accounting for half of those being added at the time of printing, it would appear that Apache is trying to use the path that contains two backslashes as path separator but there needs to be only one. Chetan -- http://mail.python.org/mailman/listinfo/python-list
Re: PROBLEM with MOD_PYTHON
dan84 wrote: I don't understand this error , in the (Apache) errorlog I read this message : [Sat Oct 28 14:04:03 2006] [error] make_obcallback: could not import mod_python.apache.\n [Sat Oct 28 14:04:03 2006] [error] make_obcallback: Python path being used ['C:Python24python24.zip', '.DLLs', '.lib', '.libplat-win', '.liblib-tk', 'C:ProgrammiApache GroupApache2bin']. The four backslashes look okay to me, since there are s outside the list, viz: mylist = [ r'C:\Python24' ] mylist ['C:\\Python24'] repr(mylist) ['C:Python24'] Back to your question: Where is mod_python located? Is it anywhere in this path? Go to each directory/zip file, and see if you find mod_python. If so, is your base directory where you think it is? (use os.getcwd() to find out). If mod_python is still not in there, where is it? Now add THAT directory to your Python path. Cheers, Cliff -- http://mail.python.org/mailman/listinfo/python-list
Re: PROBLEM with MOD_PYTHON
dan I don't understand this error , in the (Apache) errorlog I read dan this message : dan [Sat Oct 28 14:04:03 2006] [error] make_obcallback: could not import dan mod_python.apache.\n dan [Sat Oct 28 14:04:03 2006] [error] make_obcallback: Python path being dan used ['C:Python24python24.zip', '.DLLs', '.lib', dan '.libplat-win', '.liblib-tk', dan 'C:ProgrammiApache GroupApache2bin']. dan [Sat Oct 28 14:04:03 2006] [error] python_handler: no interpreter dan callback found. dan [Sat Oct 28 14:04:03 2006] [error] [client 127.0.0.1] python_handler: dan Can't get/create interpreter. Just a wild ass guess, but maybe Apache can't find the necessary python dll to load? Skip -- http://mail.python.org/mailman/listinfo/python-list
Re: PROBLEM with MOD_PYTHON
dan84 wrote: I don't understand this error , in the (Apache) errorlog I read this message : [Sat Oct 28 14:04:03 2006] [error] make_obcallback: could not import mod_python.apache.\n [Sat Oct 28 14:04:03 2006] [error] make_obcallback: Python path being used ['C:Python24python24.zip', '.DLLs', '.lib', '.libplat-win', '.liblib-tk', 'C:ProgrammiApache GroupApache2bin']. [Sat Oct 28 14:04:03 2006] [error] python_handler: no interpreter callback found. [Sat Oct 28 14:04:03 2006] [error] [client 127.0.0.1] python_handler: Can't get/create interpreter. I have Apache/2.0.59 (Win32) mod_python/3.2.10 Python/2.4.3 I have read all the manuals, but I don't understand where I am wrong. thanks so much Marco. Read: http://www.modpython.org/pipermail/mod_python/2006-October/022362.html You may have to fiddle your Windows registry to add site-packages directory. BTW, there is a mailing list specifically for mod_python. You might be better off asking questions directly there, as we have seen most problems. You can also search the mailing list archives from the mod_python site. BTW, the quadruple backslashes is indeed because of the use of repr() when doing the error dump. Graham -- http://mail.python.org/mailman/listinfo/python-list
Re: PROBLEM with MOD_PYTHON
[EMAIL PROTECTED] wrote: [...] BTW, there is a mailing list specifically for mod_python. You might be better off asking questions directly there, as we have seen most problems. You can also search the mailing list archives from the mod_python site. BTW, the quadruple backslashes is indeed because of the use of repr() when doing the error dump. For gmane users the list is also available as newsgroup gmane.comp.python.mod_python regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list
Egg cache problem with mod_python/ez_setup
Hello there, I have this weird problem with a mod_python application. Recently I installed ElementTree and cElementTree through ez_setup.py, even though they were already installed normally (this might not be too smart, but I don't think it's related to my actual problem). I have a web application written on top of mod_python that uses cElementTree for several things. After installing cElementTree through ez_setup.py, it turns out that I got this Exception on the site: (most relevant info at the end, obviously, it's quite lengthy) Mod_python error: PythonHandler equilex Traceback (most recent call last): File /usr/lib/python2.4/site-packages/mod_python/apache.py, line 287, in HandlerDispatch log=debug) File /usr/lib/python2.4/site-packages/mod_python/apache.py, line 464, in import_module module = imp.load_module(mname, f, p, d) File /var/www/equilex.eu/http/equilex/__init__.py, line 2, in ? from equilex.model import Session File /var/www/equilex.eu/http/equilex/model/__init__.py, line 4, in ? from page import Page File /var/www/equilex.eu/http/equilex/model/page.py, line 1, in ? from menu import Menu File /var/www/equilex.eu/http/equilex/model/menu.py, line 1, in ? import cElementTree as et File build/bdist.linux-i686/egg/cElementTree.py, line 7, in ? File build/bdist.linux-i686/egg/cElementTree.py, line 4, in __bootstrap__ File /usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.py, line 799, in resource_filename return get_provider(package_or_requirement).get_resource_filename( File /usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.py, line 1228, in get_resource_filename self._extract_resource(manager, self._eager_to_zip(name)) File /usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.py, line 1249, in _extract_resource real_path = manager.get_cache_path( File /usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.py, line 880, in get_cache_path self.extraction_error() File /usr/lib/python2.4/site-packages/setuptools-0.6b2-py2.4.egg/pkg_resources.py, line 846, in extraction_error raise err ExtractionError: Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 13] Permission denied: '/var/www/.python-eggs' The Python egg cache directory is currently set to: /var/www/.python-eggs Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory. Now, I already had a /tmp/eggs dir for eggs, and I had a SetEnv directive in my vhost config for my Trac vhost (which uses eggs). So I moved the SetEnv directive from the vhost config to my global httpd.conf. Curious enough, after restarting apache2, I still got the same error!! Is there any reason why it may not be picking up the env variable that points it to the other directory? Regards, Manuzhai -- http://mail.python.org/mailman/listinfo/python-list
Re: MySQLdb problem with mod_python, please help
Damjan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... MySQLdb is working fine at command line, however when I tried to use it with mod_python, it give me a server not initialized error. Maybe its this problem? http://www.modpython.org/FAQ/faqw.py?req=showfile=faq02.013.htp yep! that's the culprit. I havent' recompile php, but by removing loadmodule php, mod_python+mysql worked. Thank you very much Damjan. -- http://mail.python.org/mailman/listinfo/python-list