On Apr 4, 8:37 am, Jared Dobson <[EMAIL PROTECTED]> wrote: > Hello, > > Have anyone ever seen this error i'm on the latest svn trunk for > django, I have been searching the mailing list to find an answer. > > Mod_python is working because i mod_python.testhandler for the same > apache config section works great. > <Location "/test"> > PythonPath "['/home/'] + sys.path"
What directories are under '/home' and why would you want to add it to the Python module search path? > SetHandler python-program > PythonHandler mod_python.testhandler > SetEnv DJANGO_SETTINGS_MODULE rvs_manager.settings > PythonDebug On > </Location> > > Here is the sys.path from mod_python.testhandler: > > Python sys.path /home/ > /usr/local/lib/python25.zip > /usr/local/lib/python2.5 > /usr/local/lib/python2.5/plat-linux2 > /usr/local/lib/python2.5/lib-tk > /usr/local/lib/python2.5/lib-dynload > /usr/local/lib/python2.5/site-packages > > Also when i run sudo -u apache python(or python2.5) and import django: > <module 'django' from '/usr/local/lib/python2.5/site-packages/django/ > __init__.pyc'> But what do you get if you import 'django.core.handlers.modpython' from command line Python? What is PYTHONPATH environment variable in your personal user account? If you add '/home' to PYTHONPATH and try importing 'django.core.handlers.modpython', does it work? Verify that '/home' is in sys.path when doing this from command line. Do all the above but use 'sudo -H -u apache python2.5'. > (and python2.3 for the other one.) How does Python 2.3 come in to this? Graham > Here's the error: > > MOD_PYTHON ERROR > ProcessId: 20141 > Interpreter: 'localhost.localdomain' > ServerName: 'localhost.localdomain' > DocumentRoot: '/var/www/html' > URI: '/test/' > Location: '/test' > Directory: None > Filename: '/var/www/html/test' > PathInfo: '/' > Phase: 'PythonHandler' > Handler: 'django.core.handlers.modpython' > Traceback (most recent call last): > File "/usr/local/lib/python2.5/site-packages/mod_python/ > importer.py", line 1537, in HandlerDispatch > default=default_handler, arg=req, silent=hlist.silent) > File "/usr/local/lib/python2.5/site-packages/mod_python/ > importer.py", line 1202, in _process_target > module = import_module(module_name, path=path) > File "/usr/local/lib/python2.5/site-packages/mod_python/ > importer.py", line 304, in import_module > return __import__(module_name, {}, {}, ['*']) > ImportError: No module named django.core.handlers.modpython > > Thanks in advance for any advice or tips or if there is an some emails > that already cover this. > > Thanks, > Jared --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---