Quijost
Webmaster => Desarrollo Web => Mensaje iniciado por: raulsetro en Mayo 04, 2010, 04:24:24 am
-
Hola amigos de Quijost... estoy intentando correr mi proyecto de Django pero tengo el siguiente error necesito ayuda... aqui les pego mi error
MOD_PYTHON ERROR
ProcessId: 7528
Interpreter: 'raulsetron.quijost.com'
ServerName: 'raulsetron.quijost.com'
DocumentRoot: '/home/raulsetr/public_html'
URI: '/dpress/site/'
Location: None
Directory: '/home/raulsetr/public_html/dpress/site/'
Filename: '/home/raulsetr/public_html/dpress/site/'
PathInfo: ''
Phase: 'PythonHandler'
Handler: 'django.core.handlers.modpython'
Traceback (most recent call last):
File "/opt/python2.6/lib/python2.6/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/opt/python2.6/lib/python2.6/site-packages/mod_python/importer.py", line 1229, in _process_target
result = _execute_target(config, req, object, arg)
File "/opt/python2.6/lib/python2.6/site-packages/mod_python/importer.py", line 1128, in _execute_target
result = object(arg)
File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/modpython.py", line 228, in handler
return ModPythonHandler()(req)
File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/modpython.py", line 191, in __call__
self.load_middleware()
File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/base.py", line 33, in load_middleware
for middleware_path in settings.MIDDLEWARE_CLASSES:
File "/opt/python2.6/lib/python2.6/site-packages/django/utils/functional.py", line 282, in __getattr__
self._setup()
File "/opt/python2.6/lib/python2.6/site-packages/django/conf/__init__.py", line 40, in _setup
self._wrapped = Settings(settings_module)
File "/opt/python2.6/lib/python2.6/site-packages/django/conf/__init__.py", line 75, in __init__
raise ImportError("Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings 'dpress.settings' (Is it on sys.path? Does it have syntax errors?): No module named dpress.settings
ESPERO SU AYUDA GRACIAS
-
Según el mensaje de traza:
ImportError: Could not import settings 'dpress.settings'
Eso indica que no tienes dpress en el path de python, luego en el archivo .htaccess debes indicar el path donde tengas dpress, posiblemente sea /home/tu_usuario/dpress/
-
sigue mi error el dpress lo cambie al nombre de mi proyecto que se llama persona y ahora sale esto
MOD_PYTHON ERROR
ProcessId: 27751
Interpreter: 'raulsetron.quijost.com'
ServerName: 'raulsetron.quijost.com'
DocumentRoot: '/home/raulsetr/public_html'
URI: '/persona/'
Location: None
Directory: '/home/raulsetr/public_html/persona/'
Filename: '/home/raulsetr/public_html/persona/'
PathInfo: ''
Phase: 'PythonHandler'
Handler: 'django.core.handlers.modpython'
Traceback (most recent call last):
File "/opt/python2.6/lib/python2.6/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/opt/python2.6/lib/python2.6/site-packages/mod_python/importer.py", line 1229, in _process_target
result = _execute_target(config, req, object, arg)
File "/opt/python2.6/lib/python2.6/site-packages/mod_python/importer.py", line 1128, in _execute_target
result = object(arg)
File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/modpython.py", line 228, in handler
return ModPythonHandler()(req)
File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/modpython.py", line 191, in __call__
self.load_middleware()
File "/opt/python2.6/lib/python2.6/site-packages/django/core/handlers/base.py", line 33, in load_middleware
for middleware_path in settings.MIDDLEWARE_CLASSES:
File "/opt/python2.6/lib/python2.6/site-packages/django/utils/functional.py", line 282, in __getattr__
self._setup()
File "/opt/python2.6/lib/python2.6/site-packages/django/conf/__init__.py", line 40, in _setup
self._wrapped = Settings(settings_module)
File "/opt/python2.6/lib/python2.6/site-packages/django/conf/__init__.py", line 75, in __init__
raise ImportError("Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings 'persona.settings' (Is it on sys.path? Does it have syntax errors?): No module named persona.settings
Gracias
-
Este sería un posible archivo .htaccess con una configuración para dpress (debe ponerlo bajo el directorio dpress, modificando las rutas segun su instalación y cambiando "tu_usuario" por el nombre de su usuario quijost):
SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonPath "['/home/tu_usuario/public_html/dpress/site/', '/home/tu_usuario/public_html/modules', '/home/tu_usuario/public_html/modules/tinymce', '/home/tu_usuario/public_html/modules/filebrowser'] + sys.path"
SetEnv PYTHON_EGG_CACHE /tmp/trac-eggs
SetEnv DJANGO_SETTINGS_MODULE dpress.settings