mod_python error
Hi, i've been trying to figure out why i'm getting this error (i removed the 500.html template to view the traceback, but am not sure what's causing the unhandled exception in the first place). any ideas? thanks MOD_PYTHON ERROR ProcessId: 10894 Interpreter:'domU-12-31-39-03-BD-34.compute-1.internal' ServerName: 'domU-12-31-39-03-BD-34.compute-1.internal' DocumentRoot: '/usr/local/apache2/htdocs' URI:'/contact.php' Location: '/' Directory: None Filename: '/usr/local/apache2/htdocs/contact.php' 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 1229, in _process_target result = _execute_target(config, req, object, arg) File "/usr/local/lib/python2.5/site-packages/mod_python/ importer.py", line 1128, in _execute_target result = object(arg) File "/usr/local/lib/python2.5/site-packages/django/core/handlers/ modpython.py", line 228, in handler return ModPythonHandler()(req) File "/usr/local/lib/python2.5/site-packages/django/core/handlers/ modpython.py", line 201, in __call__ response = self.get_response(request) File "/usr/local/lib/python2.5/site-packages/django/core/handlers/ base.py", line 116, in get_response return self.handle_uncaught_exception(request, resolver, sys.exc_info()) File "/usr/local/lib/python2.5/site-packages/django/core/handlers/ base.py", line 160, in handle_uncaught_exception return callback(request, **param_dict) File "/usr/local/lib/python2.5/site-packages/django/views/ defaults.py", line 23, in server_error t = loader.get_template(template_name) # You need to create a 500.html template. File "/usr/local/lib/python2.5/site-packages/django/template/ loader.py", line 80, in get_template source, origin = find_template_source(template_name) File "/usr/local/lib/python2.5/site-packages/django/template/ loader.py", line 73, in find_template_source raise TemplateDoesNotExist, name TemplateDoesNotExist: 500.html --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
MOD_PYTHON ERROR
my httpd.conf seetings as: SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonOption django.root /mysite PythonDebug On PythonPath "['C:/Python25/Lib/site-packages/django','C:/Program Files/Apache2.2/htdocs/mysite','c:/Program Files/Apache Software Foundation/Apache2.2/htdocs', '/django']" I found error in browser like: MOD_PYTHON ERROR ProcessId: 3000 Interpreter:'asraful.brotecs.com' ServerName: 'asraful.brotecs.com' DocumentRoot: 'C:/Program Files/Apache Software Foundation/Apache2.2/ htdocs' URI:'/mysite/' Location: '/mysite/' Directory: None Filename: 'C:/Program Files/Apache Software Foundation/Apache2.2/ htdocs/mysite/' PathInfo: '' Phase: 'PythonHandler' Handler:'django.core.handlers.modpython' Traceback (most recent call last): File "C:\Python25\Lib\site-packages\mod_python\importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "C:\Python25\Lib\site-packages\mod_python\importer.py", line 1202, in _process_target module = import_module(module_name, path=path) File "C:\Python25\Lib\site-packages\mod_python\importer.py", line 304, in import_module return __import__(module_name, {}, {}, ['*']) ImportError: No module named django.core.handlers.modpython And how can i create settings.py file for my project. Is any one there to help me on these. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
mod_python error
Hi, I have set up my apache with mod_python. When I call my main page on /, it works fine. However, when I try to access to other applications (/users/23) I get this error: ImproperlyConfigured: Error while importing URLconf 'recs.urls': No module named recs.urls My main urls.py code is: urlpatterns = patterns('', (r'^$', 'qsm.recs.views.matrix'), (r'^users/', include('recs.urls')), ... and more And of course, I have a recs/urls.py file with a correct configuration... My mod_python config is : SetHandler python-program PythonHandler django.core.handlers.modpython PythonPath "['/home/bcurtu/ws-python'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE qsm.settings PythonDebug On Everything looks fine, isn't it? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
MOD_PYTHON ERROR
Hello all, I'm not for sure what this error is all about. I had django up and running with out flaw for quite a while but last night I decided to svn update my django source and that's when it seemed to flip out giving me this error message. Also I have have a script that I run from time to time that removes pyc file so I don't know if there is some sort of conflict there assuming not. Currently I am using ubuntu 7.10 with apache/django/postgres and python 2.5.1 Help would be aprociated Thanks in advance! MOD_PYTHON ERROR ProcessId: 12752 Interpreter:'django.xyz.net' ServerName: 'django.xyz.net' DocumentRoot: '/htdocs' URI:'/blogger/' Location: '/' Directory: None Filename: '/htdocs' PathInfo: '/blogger/' Phase: 'PythonHandler' Handler:'django.core.handlers.modpython' Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg) File "/srv/django-0.96-current/django/core/handlers/modpython.py", line 187, in handler return ModPythonHandler()(req) File "/srv/django-0.96-current/django/core/handlers/modpython.py", line 151, in __call__ self.load_middleware() File "/srv/django-0.96-current/django/core/handlers/base.py", line 26, in load_middleware for middleware_path in settings.MIDDLEWARE_CLASSES: File "/srv/django-0.96-current/django/conf/__init__.py", line 28, in __getattr__ self._import_settings() File "/srv/django-0.96-current/django/conf/__init__.py", line 57, in _import_settings self._target = Settings(settings_module) File "/srv/django-0.96-current/django/conf/__init__.py", line 85, in __init__ raise EnvironmentError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e) EnvironmentError: Could not import settings 'django_site.settings' (Is it on sys.path? Does it have syntax errors?): No module named settings --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
mod_python error
I'm getting an error w/ mod_python. My configuration and the stacktrace are below. Any help would be appreciated 8) I'm sure it's something simple. The app runs fine w/ the django dev server, but won't do anything with mod_python, so I'm sure I have a path or something wrong. Thanks --B SetHandler python-program PythonPath "['/bfordham/virtual/critterwatch'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE critterwatch.settings.main PythonDebug On [Mon Aug 15 07:48:09 2005] [error] PythonHandler django.core.handlers.modpython: Traceback (most recent call last): [Mon Aug 15 07:48:09 2005] [error] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 193, in Dispatch\nresult = object(req) [Mon Aug 15 07:48:09 2005] [error] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.3/site-packages/django-1.0.0-py2.3.egg/django/core/handlers/modpython.py", line 169, in handler\nreturn ModPythonHandler()(req) [Mon Aug 15 07:48:09 2005] [error] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.3/site-packages/django-1.0.0-py2.3.egg/django/core/handlers/modpython.py", line 131, in __call__\nos.environ.update(req.subprocess_env) [Mon Aug 15 07:48:09 2005] [error] PythonHandler django.core.handlers.modpython: File "/usr/lib/python2.3/os.py", line 448, in update\nfor k, v in dict.items(): [Mon Aug 15 07:48:09 2005] [error] PythonHandler django.core.handlers.modpython: AttributeError: items
Re: MOD_PYTHON ERROR
On Fri, Sep 18, 2009 at 4:38 PM, When ideas fail wrote: > > Hello, can someone tell me what this error means? It seems to be > stopping all my django stuff from working, it doesn't even render > error pages anymore. I've tried deleting all the stuff i've done > since it started happening but still no joy. > > Thanks, > > Andrew > > MOD_PYTHON ERROR > > [snip] File "C:\ProgLangs\Python25\lib\site-packages\django\utils > \translation\trans_real.py", line 198, in translation >default_translation = _fetch(settings.LANGUAGE_CODE) > File "C:\ProgLangs\Python25\lib\site-packages\django\utils > \translation\trans_real.py", line 181, in _fetch >app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]), > appname[p+1:]) > AttributeError: 'module' object has no attribute 'openid' > > Looks like you've added some app named 'openid' to your INSTALLED_APPS but it isn't being found when Django tries to import it. Karen --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: MOD_PYTHON ERROR
Thanks Karen, that was it, I thought i had deleted it but it managed to sneak in there twice somehow, so one was left. On 19 Sep, 02:21, Karen Tracey wrote: > On Fri, Sep 18, 2009 at 4:38 PM, When ideas fail > wrote: > > > > > Hello, can someone tell me what this error means? It seems to be > > stopping all my django stuff from working, it doesn't even render > > error pages anymore. I've tried deleting all the stuff i've done > > since it started happening but still no joy. > > > Thanks, > > > Andrew > > > MOD_PYTHON ERROR > > > [snip] > > File "C:\ProgLangs\Python25\lib\site-packages\django\utils> > \translation\trans_real.py", line 198, in translation > > default_translation = _fetch(settings.LANGUAGE_CODE) > > File "C:\ProgLangs\Python25\lib\site-packages\django\utils > > \translation\trans_real.py", line 181, in _fetch > > app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]), > > appname[p+1:]) > > AttributeError: 'module' object has no attribute 'openid' > > Looks like you've added some app named 'openid' to your INSTALLED_APPS but > it isn't being found when Django tries to import it. > > Karen --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: mod_python error
On Mon, Apr 6, 2009 at 5:35 PM, skunkwerk wrote: > > Hi, > i've been trying to figure out why i'm getting this error (i > removed the 500.html template to view the traceback, but am not sure > what's causing the unhandled exception in the first place). any > ideas? > Removing the 500.html template doesn't help in getting the traceback you really want to see -- as you see you just get a traceback reporting that the 500.html template can't be found. You either want to run with DEBUG set to True so you'll get a debug page, or if the problem is only occurring with DEBUG=False, make sure that the EMAIL_HOST, etc. settings are set properly so that the server can email the real traceback to you. (And put 500.html back, so you'll get the right traceback in the email.) Karen --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: mod_python error
And... what about that : DocumentRoot: '/usr/local/apache2/htdocs' URI:'/contact.php' Location: '/' Directory: None Filename: '/usr/local/apache2/htdocs/ contact.php' PathInfo: '' Phase: 'PythonHandler' Handler:'django.core.handlers.modpython' Are you trying to serve a php file with mod_python ? If you see what I meen. :] --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: mod_python error
problem solved - i needed to refresh the page in my browser to see the debug log. thanks! On Apr 7, 1:59 am, Florian Strzelecki wrote: > And... what about that : > > DocumentRoot: '/usr/local/apache2/htdocs' > > URI: '/contact.php' > Location: '/' > Directory: None > Filename: '/usr/local/apache2/htdocs/ > contact.php' > PathInfo: '' > > Phase: 'PythonHandler' > Handler: 'django.core.handlers.modpython' > > Are you trying to serve a php file with mod_python ? > If you see what I meen. :] --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: mod_python error
thanks guys, the error isn't just with .php pages so i don't think that's the problem. i've turned on debug mode, and put back 500.html, but I'm not seeing a debug page... just the 500 page template with no tracebacks or anything. how do i see the regular django debug page? On Apr 7, 1:59 am, Florian Strzelecki wrote: > And... what about that : > > DocumentRoot: '/usr/local/apache2/htdocs' > > URI: '/contact.php' > Location: '/' > Directory: None > Filename: '/usr/local/apache2/htdocs/ > contact.php' > PathInfo: '' > > Phase: 'PythonHandler' > Handler: 'django.core.handlers.modpython' > > Are you trying to serve a php file with mod_python ? > If you see what I meen. :] --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: mod_python error
i guess the relative path is the question i assume ws-python is the directory your main urls file is in and the recs directly lives in it, with an __init__.py file ? On Fri, Apr 18, 2008 at 12:15 PM, bcurtu <[EMAIL PROTECTED]> wrote: > > Hi, > > I have set up my apache with mod_python. When I call my main page > on /, it works fine. However, when I try to access to other > applications (/users/23) I get this error: > > ImproperlyConfigured: Error while importing URLconf 'recs.urls': No > module named recs.urls > > My main urls.py code is: > > urlpatterns = patterns('', > (r'^$', 'qsm.recs.views.matrix'), > (r'^users/', include('recs.urls')), ... and more > > And of course, I have a recs/urls.py file with a correct > configuration... > > My mod_python config is : > > > SetHandler python-program > PythonHandler django.core.handlers.modpython > PythonPath "['/home/bcurtu/ws-python'] + sys.path" > SetEnv DJANGO_SETTINGS_MODULE qsm.settings > PythonDebug On > > > Everything looks fine, isn't it? > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: mod_python error
Not exactly. The directory tree is: ws-python/ qsm/ recs/ others/ Where qsm is the project that contains the main urls.py, and recs and others are applications with own urls.py files. Thanks! On 18 abr, 19:17, "Michael Wieher" <[EMAIL PROTECTED]> wrote: > i guess the relative path is the question > > i assume ws-python is the directory your main urls file is in > and the recs directly lives in it, with an __init__.py file ? > > On Fri, Apr 18, 2008 at 12:15 PM, bcurtu <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I have set up my apache with mod_python. When I call my main page > > on /, it works fine. However, when I try to access to other > > applications (/users/23) I get this error: > > > ImproperlyConfigured: Error while importing URLconf 'recs.urls': No > > module named recs.urls > > > My main urls.py code is: > > > urlpatterns = patterns('', > > (r'^$', 'qsm.recs.views.matrix'), > > (r'^users/', include('recs.urls')), ... and more > > > And of course, I have a recs/urls.py file with a correct > > configuration... > > > My mod_python config is : > > > > > SetHandler python-program > > PythonHandler django.core.handlers.modpython > > PythonPath "['/home/bcurtu/ws-python'] + sys.path" > > SetEnv DJANGO_SETTINGS_MODULE qsm.settings > > PythonDebug On > > > > > Everything looks fine, isn't it? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: mod_python error
I got it! It was my apache config, I have included the path to the root of the project: PythonPath "['/home/bcurtu/ws-python','/home/bcurtu/ws-python/qsm'] + sys.path" Now it works, thanks! On 18 abr, 19:17, "Michael Wieher" <[EMAIL PROTECTED]> wrote: > i guess the relative path is the question > > i assume ws-python is the directory your main urls file is in > and the recs directly lives in it, with an __init__.py file ? > > On Fri, Apr 18, 2008 at 12:15 PM, bcurtu <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I have set up my apache with mod_python. When I call my main page > > on /, it works fine. However, when I try to access to other > > applications (/users/23) I get this error: > > > ImproperlyConfigured: Error while importing URLconf 'recs.urls': No > > module named recs.urls > > > My main urls.py code is: > > > urlpatterns = patterns('', > > (r'^$', 'qsm.recs.views.matrix'), > > (r'^users/', include('recs.urls')), ... and more > > > And of course, I have a recs/urls.py file with a correct > > configuration... > > > My mod_python config is : > > > > > SetHandler python-program > > PythonHandler django.core.handlers.modpython > > PythonPath "['/home/bcurtu/ws-python'] + sys.path" > > SetEnv DJANGO_SETTINGS_MODULE qsm.settings > > PythonDebug On > > > > > Everything looks fine, isn't it? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: mod_python error
The way I've done this, the include needs the full path. Have you tried: (r'^users/', include('qsm.recs.urls')), ? Tim On Friday 18 Apr 2008, bcurtu wrote: > Not exactly. The directory tree is: > > ws-python/ > qsm/ > recs/ > others/ > > Where qsm is the project that contains the main urls.py, and recs and > others are applications with own urls.py files. > > Thanks! > > On 18 abr, 19:17, "Michael Wieher" <[EMAIL PROTECTED]> wrote: > > i guess the relative path is the question > > > > i assume ws-python is the directory your main urls file is in > > and the recs directly lives in it, with an __init__.py file ? > > > > On Fri, Apr 18, 2008 at 12:15 PM, bcurtu <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > I have set up my apache with mod_python. When I call my main page > > > on /, it works fine. However, when I try to access to other > > > applications (/users/23) I get this error: > > > > > > ImproperlyConfigured: Error while importing URLconf 'recs.urls': No > > > module named recs.urls > > > > > > My main urls.py code is: > > > > > > urlpatterns = patterns('', > > > (r'^$', 'qsm.recs.views.matrix'), > > > (r'^users/', include('recs.urls')), ... and more > > > > > > And of course, I have a recs/urls.py file with a correct > > > configuration... > > > > > > My mod_python config is : > > > > > > > > > SetHandler python-program > > > PythonHandler django.core.handlers.modpython > > > PythonPath "['/home/bcurtu/ws-python'] + sys.path" > > > SetEnv DJANGO_SETTINGS_MODULE qsm.settings > > > PythonDebug On > > > > > > > > > Everything looks fine, isn't it? > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: mod_python error
You could have also used: urlpatterns = patterns('', (r'^$', 'qsm.recs.views.matrix'), (r'^users/', include('qsm.recs.urls')), because (as you know now) the python path was looking up to your project directory, but not as far as your application directory... Aaron bcurtu wrote: I got it! It was my apache config, I have included the path to the root of the project: PythonPath "['/home/bcurtu/ws-python','/home/bcurtu/ws-python/qsm'] + sys.path" Now it works, thanks! On 18 abr, 19:17, "Michael Wieher" <[EMAIL PROTECTED]> wrote: i guess the relative path is the question i assume ws-python is the directory your main urls file is in and the recs directly lives in it, with an __init__.py file ? On Fri, Apr 18, 2008 at 12:15 PM, bcurtu <[EMAIL PROTECTED]> wrote: Hi, I have set up my apache with mod_python. When I call my main page on /, it works fine. However, when I try to access to other applications (/users/23) I get this error: ImproperlyConfigured: Error while importing URLconf 'recs.urls': No module named recs.urls My main urls.py code is: urlpatterns = patterns('', (r'^$', 'qsm.recs.views.matrix'), (r'^users/', include('recs.urls')), ... and more And of course, I have a recs/urls.py file with a correct configuration... My mod_python config is : SetHandler python-program PythonHandler django.core.handlers.modpython PythonPath "['/home/bcurtu/ws-python'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE qsm.settings PythonDebug On Everything looks fine, isn't it? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
SOMETIMES mod_python error
Dear all, I am experiencing some situation that is very strange. the development site is http://alberta.design97.com This site is django-powered, it is up sometimes, on some computers, you can visit this site for a preview, if you get an error, try reload the page, usually the page will show within 5-10 times reload. The error message that i SOMETIMES got is: MOD_PYTHON ERROR ProcessId: 15673 Interpreter:'alberta.design97.com' ServerName: 'alberta.design97.com' DocumentRoot: '/var/www/vhosts/design97.com/subdomains/alberta/ httpdocs' URI:'/' Location: '/' Directory: None Filename: '/var/www/vhosts/design97.com/subdomains/alberta/ httpdocs/' PathInfo: '' Phase: 'PythonHandler' Handler:'django.core.handlers.modpython' Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/usr/lib/python2.3/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg) File "/usr/lib/python2.3/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg) File "/usr/lib/python2.3/site-packages/django/core/handlers/ modpython.py", line 177, in handler return ModPythonHandler()(req) File "/usr/lib/python2.3/site-packages/django/core/handlers/ modpython.py", line 150, in __call__ response = self.get_response(request) File "/usr/lib/python2.3/site-packages/django/core/handlers/ base.py", line 111, in get_response return debug.technical_500_response(request, *sys.exc_info()) File "/usr/lib/python2.3/site-packages/django/views/debug.py", line 103, in technical_500_response pre_context_lineno, pre_context, context_line, post_context = _get_lines_from_file(filename, lineno, 7, loader, module_name) File "/usr/lib/python2.3/site-packages/django/views/debug.py", line 195, in _get_lines_from_file context_line = source[lineno].strip('\n') IndexError: list index out of range --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: MOD_PYTHON ERROR
On Wed, 2007-11-14 at 19:46 -0800, pacman wrote: > Hello all, > I'm not for sure what this error is all about. I had django up and > running with out flaw for quite a while but last night I decided to > svn update my django source and that's when it seemed to flip out > giving me this error message. Also I have have a script that I run > from time to time that removes pyc file so I don't know if there is > some sort of conflict there assuming not. You did read the backwards incompatible changes wiki page and made sure you were up to speed there, didn't you? Do your tests also fail? Do their failures give you any clues? Try running your code under the development web server and see if anything else shows up. Try going back to halfway between the version you were at and where you are now and see if the problem occurs. Repeat until you find the problem. Malcolm -- I intend to live forever - so far so good. http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: MOD_PYTHON ERROR
Well, from what I can tell, there should not be any incompatibilities since as of right now the farthest that I have gotten was creating models. I didn't see anything from the wiki list that would pose a problem. I tested out on the django built-in server yesterday and it runs like a charm. So my thoughts are that it has something to do with mod-python or apache. I didn't notice this error until I svn up'd django source and removed my pyc files. I checked my apache log file to and noticed the same errors as above. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: MOD_PYTHON ERROR
On Nov 15, 8:32 pm, pacman <[EMAIL PROTECTED]> wrote: > Well, from what I can tell, there should not be any incompatibilities > since as of right now the farthest that I have gotten was creating > models. I didn't see anything from the wiki list that would pose a > problem. I tested out on the django built-in server yesterday and it > runs like a charm. So my thoughts are that it has something to do with > mod-python or apache. I didn't notice this error until I svn up'd > django source and removed my pyc files. > > I checked my apache log file to and noticed the same errors as above. Why don't you post then the mod_python bits of your Apache configuration and in particular what you have PythonPath directive set to. For good measure, also post your urls.py file as well so can see how you reference code within the site and whether it would work against what you have set PythonPath directive to. FWIW, is there any way that Django could be changed so that it doesn't just discard the original traceback indicating why the settings.py file wasn't imported in the first place. Ie., currently it does: try: mod = __import__(self.SETTINGS_MODULE, {}, {}, ['']) except ImportError, e: raise EnvironmentError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e) Could it perhaps convert the original exception tracback into the string and stuff it into this exception such that it is printed out, or output it in some other way? If we had that information it would be so much easier to solve these problems as we would know whether it is a case of not finding the settings module or there being an error in it, or not finding some other module that it in turn tries to import. Graham --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: MOD_PYTHON ERROR
pacman, looks like you code imported in settings.py conflicts with updated django code. Execute ./manage.py validate or ./manage.py test to find the problem file. -- Dima Dogadaylo, http://www.mysoftparade.com/ On Wed, 2007-11-14 at 19:46 -0800, pacman wrote: > Hello all, > I'm not for sure what this error is all about. I had django up and > running with out flaw for quite a while but last night I decided to > svn update my django source and that's when it seemed to flip out > giving me this error message. Also I have have a script that I run > from time to time that removes pyc file so I don't know if there is > some sort of conflict there assuming not. > > Currently I am using ubuntu 7.10 with apache/django/postgres and > python 2.5.1 > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: MOD_PYTHON ERROR
Ok this morning it seems that I have found the error but I am not sure why this is. So this morning I decided to try and svn update on my django 96 source and after doing so. I was able to get my functionality back. Next I decided to run my script that removes pyc files. After doing so I again got this crazy error. So next I proceeded with running manage.py validate getting 0 errors and my functionality back. so when it validated, it recreated the necessary pyc files that I just removed and all works again. here is a dpaste of the script that I ran if interested: http://dpaste.com/25049/. Having said that, you are probably wondering why I remove the pyc and other files suchas Ds_Store. Well there is a problem somewhere along the line when I am developing that tends to want to cache results therefore giving me inadequate results. (and the caching module is not enabled). I think in some part it has to do with apache. In apache I set the MaxRequestsPerChild 1 so that apache is forced to recreate a new request each time. even after doing that I still seem to experience caching problems so my quick fix is to remove the pyc (which that doesn't always work either). Another reason that remove my files is for when I do an svn commit. I don't want extra crap files being committed with that. Anyone have further suggestions as to why this freaks out when I remove pyc files and giving errors? Is there a better approach to solving or better handling the caching problem when in development mode? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: MOD_PYTHON ERROR
well actually I take back part of what I said. I am still getting errors it simply gives me a django error page instead of a white text page with python errors. Request Method: GET Request URL:http://django.xyz.net/blogger/ Exception Type: ImproperlyConfigured Exception Value:Error while importing URLconf 'django_site.urls': No module named urls Exception Location: /srv/django-0.96-current/django/core/ urlresolvers.py in _get_urlconf_module, line 255 Python Executable: /usr/bin/python Python Version: 2.5.1 And it is not the obvious, that I miss-configured the urls b/c I only have the admin/ url enabled and I can't event get to that. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: MOD_PYTHON ERROR
On Thu, 2007-11-15 at 07:54 -0800, pacman wrote: > well actually I take back part of what I said. I am still getting > errors it simply gives me a django error page instead of a white text > page with python errors. > > Request Method: GET > Request URL: http://django.xyz.net/blogger/ > Exception Type: ImproperlyConfigured > Exception Value: Error while importing URLconf 'django_site.urls': No > module named urls This sounds like your path is not correct. > Exception Location: /srv/django-0.96-current/django/core/ > urlresolvers.py in _get_urlconf_module, line 255 > Python Executable:/usr/bin/python > Python Version: 2.5.1 > > And it is not the obvious, that I miss-configured the urls b/c I only > have the admin/ url enabled and I can't event get to that. I think it's going to more helpful if you can post the mod_python config portion of your Apache config, as Graham asked. This looks a lot like a config problem. Malcolm -- Borrow from a pessimist - they don't expect it back. http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: mod_python error
On 8/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm getting an error w/ mod_python. My configuration and the > stacktrace are below. Any help would be appreciated 8) > > I'm sure it's something simple. The app runs fine w/ the django dev > server, but won't do anything with mod_python, so I'm sure I have a > path or something wrong. > > Thanks > --B What version of mod_python are you using? I'm going to hazard a guess that it's mod_python version 2.x, with Apache 1.x. mod_python 2.x tends to produce exactly the kind of traceback you're seeing -- some problem with it not handling SetEnv, if I remember correctly. You'll need to upgrade to Apache 2.x so you can use mod_python 3.x, then your problem should go away. Of course, you may not be able to upgrade Apache if you're in a shared hosting environment... :-( That's when you start looking at solutions like FastCGI. More information on various different server arrangements is over at http://code.djangoproject.com/wiki/ServerArrangements if you're interested. -- Robin Munn [EMAIL PROTECTED] GPG key 0xD6497014
Re: mod_python error
Your right, I upgraded to apache2 and mod_python 3.1 and everything is happy. I found that mentioned elsewhere. If no one else has, maybe I'll submit a ticket to get this updated in the documentation. Thanks --B
Django, mod_python error
Hello, I've recently started to learn Django. I'm having a problem setting it up with apache2 and mod_python on Ubuntu 5.10. These are my mod_python settings in apache """ SetHandler mod_python PythonPath "['/home/rousseau/code/django'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE resumekeeper.settings PythonDebug On """ So when I go to localhost/resumekeeper/, this is the error I get is """ Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req) File "/usr/lib/python2.4/site-packages/Django-0.91-py2.4.egg/django/core/handlers/modpython.py", line 165, in handler return ModPythonHandler()(req) File "/usr/lib/python2.4/site-packages/Django-0.91-py2.4.egg/django/core/handlers/modpython.py", line 135, in __call__ self.load_middleware() File "/usr/lib/python2.4/site-packages/Django-0.91-py2.4.egg/django/core/handlers/base.py", line 28, in load_middleware raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e) ImproperlyConfigured: Error importing middleware django.middleware.sessions: "No module named resumes" """ Any ideas on what I'm doing wrong? Thanks, Ryan Rousseau
Re: SOMETIMES mod_python error
Have you tried restarting the web server? Arnold Chen wrote: > Dear all, > > I am experiencing some situation that is very strange. the development > site is http://alberta.design97.com > > This site is django-powered, it is up sometimes, on some computers, > you can visit this site for a preview, if you get an error, try reload > the page, usually the page will show within 5-10 times reload. > > The error message that i SOMETIMES got is: > > MOD_PYTHON ERROR > > ProcessId: 15673 > Interpreter:'alberta.design97.com' > > ServerName: 'alberta.design97.com' > DocumentRoot: '/var/www/vhosts/design97.com/subdomains/alberta/ > httpdocs' > > URI:'/' > Location: '/' > Directory: None > Filename: '/var/www/vhosts/design97.com/subdomains/alberta/ > httpdocs/' > PathInfo: '' > > Phase: 'PythonHandler' > Handler:'django.core.handlers.modpython' > > Traceback (most recent call last): > > File "/usr/lib/python2.3/site-packages/mod_python/importer.py", line > 1537, in HandlerDispatch > default=default_handler, arg=req, silent=hlist.silent) > > File "/usr/lib/python2.3/site-packages/mod_python/importer.py", line > 1229, in _process_target > result = _execute_target(config, req, object, arg) > > File "/usr/lib/python2.3/site-packages/mod_python/importer.py", line > 1128, in _execute_target > result = object(arg) > > File "/usr/lib/python2.3/site-packages/django/core/handlers/ > modpython.py", line 177, in handler > return ModPythonHandler()(req) > > File "/usr/lib/python2.3/site-packages/django/core/handlers/ > modpython.py", line 150, in __call__ > response = self.get_response(request) > > File "/usr/lib/python2.3/site-packages/django/core/handlers/ > base.py", line 111, in get_response > return debug.technical_500_response(request, *sys.exc_info()) > > File "/usr/lib/python2.3/site-packages/django/views/debug.py", line > 103, in technical_500_response > pre_context_lineno, pre_context, context_line, post_context = > _get_lines_from_file(filename, lineno, 7, loader, module_name) > > File "/usr/lib/python2.3/site-packages/django/views/debug.py", line > 195, in _get_lines_from_file > context_line = source[lineno].strip('\n') > > IndexError: list index out of range --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: SOMETIMES mod_python error
Yes, the server has been restarted many times On 9月11日, 下午6時54分, Ryan K <[EMAIL PROTECTED]> wrote: > Have you tried restarting the web server? > > Arnold Chen wrote: > > Dear all, > > > I am experiencing some situation that is very strange. the development > > site ishttp://alberta.design97.com > > > This site is django-powered, it is up sometimes, on some computers, > > you can visit this site for a preview, if you get an error, try reload > > the page, usually the page will show within 5-10 times reload. > > > The error message that i SOMETIMES got is: > > > MOD_PYTHON ERROR > > > ProcessId: 15673 > > Interpreter:'alberta.design97.com' > > > ServerName: 'alberta.design97.com' > > DocumentRoot: '/var/www/vhosts/design97.com/subdomains/alberta/ > > httpdocs' > > > URI:'/' > > Location: '/' > > Directory: None > > Filename: '/var/www/vhosts/design97.com/subdomains/alberta/ > > httpdocs/' > > PathInfo: '' > > > Phase: 'PythonHandler' > > Handler:'django.core.handlers.modpython' > > > Traceback (most recent call last): > > > File "/usr/lib/python2.3/site-packages/mod_python/importer.py", line > > 1537, in HandlerDispatch > > default=default_handler, arg=req, silent=hlist.silent) > > > File "/usr/lib/python2.3/site-packages/mod_python/importer.py", line > > 1229, in _process_target > > result = _execute_target(config, req, object, arg) > > > File "/usr/lib/python2.3/site-packages/mod_python/importer.py", line > > 1128, in _execute_target > > result = object(arg) > > > File "/usr/lib/python2.3/site-packages/django/core/handlers/ > > modpython.py", line 177, in handler > > return ModPythonHandler()(req) > > > File "/usr/lib/python2.3/site-packages/django/core/handlers/ > > modpython.py", line 150, in __call__ > > response = self.get_response(request) > > > File "/usr/lib/python2.3/site-packages/django/core/handlers/ > > base.py", line 111, in get_response > > return debug.technical_500_response(request, *sys.exc_info()) > > > File "/usr/lib/python2.3/site-packages/django/views/debug.py", line > > 103, in technical_500_response > > pre_context_lineno, pre_context, context_line, post_context = > > _get_lines_from_file(filename, lineno, 7, loader, module_name) > > > File "/usr/lib/python2.3/site-packages/django/views/debug.py", line > > 195, in _get_lines_from_file > > context_line = source[lineno].strip('\n') > > > IndexError: list index out of range --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: SOMETIMES mod_python error
On Sep 11, 8:27 pm, Arnold Chen <[EMAIL PROTECTED]> wrote: > Dear all, > > I am experiencing some situation that is very strange. the development > site ishttp://alberta.design97.com > > This site is django-powered, it is up sometimes, on some computers, > you can visit this site for a preview, if you get an error, try reload > the page, usually the page will show within 5-10 times reload. > > The error message that i SOMETIMES got is: > > MOD_PYTHON ERROR > > ProcessId: 15673 > Interpreter:'alberta.design97.com' > > ServerName: 'alberta.design97.com' > DocumentRoot: '/var/www/vhosts/design97.com/subdomains/alberta/ > httpdocs' > > URI:'/' > Location: '/' > Directory: None > Filename: '/var/www/vhosts/design97.com/subdomains/alberta/ > httpdocs/' > PathInfo: '' > > Phase: 'PythonHandler' > Handler:'django.core.handlers.modpython' > > Traceback (most recent call last): > > File "/usr/lib/python2.3/site-packages/mod_python/importer.py", line > 1537, in HandlerDispatch > default=default_handler, arg=req, silent=hlist.silent) > > File "/usr/lib/python2.3/site-packages/mod_python/importer.py", line > 1229, in _process_target > result = _execute_target(config, req, object, arg) > > File "/usr/lib/python2.3/site-packages/mod_python/importer.py", line > 1128, in _execute_target > result = object(arg) > > File "/usr/lib/python2.3/site-packages/django/core/handlers/ > modpython.py", line 177, in handler > return ModPythonHandler()(req) > > File "/usr/lib/python2.3/site-packages/django/core/handlers/ > modpython.py", line 150, in __call__ > response = self.get_response(request) > > File "/usr/lib/python2.3/site-packages/django/core/handlers/ > base.py", line 111, in get_response > return debug.technical_500_response(request, *sys.exc_info()) > > File "/usr/lib/python2.3/site-packages/django/views/debug.py", line > 103, in technical_500_response > pre_context_lineno, pre_context, context_line, post_context = > _get_lines_from_file(filename, lineno, 7, loader, module_name) > > File "/usr/lib/python2.3/site-packages/django/views/debug.py", line > 195, in _get_lines_from_file > context_line = source[lineno].strip('\n') > > IndexError: list index out of range This would appear possibly to be a secondary problem to your real problem. Ie., some exception is occurring in your code which is triggering a debug page and display of that debug page is failing. The intent of the debug page is to display the source code context from your code file. It does this by opening up the code file and reading it. If however the code file has been changed since it was loaded, it may contain a different number of lines to what the running code thinks it has. If the error line is greater than how many lines now exist in the code file, then it would be trying to access a line that doesn't exist and would fail. This mismatch may also occur if for some reason the .py file was changed, but the .pyc/.pyo file next to it is still newer but for a different lot of code. Thus remove .pyc/.pyo files and see if that makes a difference. The only other alternative is that somehow incorrect filename or line number is being passed to _get_lines_from_file(). You would have to instrument the Django code with some debugging statements to see what is being passed to work out whether that is the case. BTW, what version of Django are you using? The number of arguments to _get_lines_from_file() differs to what is used in 0.95/0.96. Are you using an older version, or newer version from subversion? Graham --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Mod_python error: "PythonHandler django.core.handlers.modpython"
trying to solve the for couple of hours with no success: Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/mod_python/apache.py", line 287, in HandlerDispatch log=debug) File "/usr/lib/python2.5/site-packages/mod_python/apache.py", line 461, in import_module f, p, d = imp.find_module(parts[i], path) ImportError: No module named core mod_python works with. mod_python.testhandler django works as developement server and also import in python interpreter --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Mod_python error after reboot
Hi Everyone, after a reboot of my server i am getting this error on my homepage: Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib64/python2.3/site-packages/mod_python/apache.py", line 287, in HandlerDispatch log=debug) File "/usr/lib64/python2.3/site-packages/mod_python/apache.py", line 454, in import_module f, p, d = imp.find_module(parts[i], path) ImportError: No module named django i have checked my python path in my httpd.conf and it is correct. nothing has changed on the server. literally all that has happened is a reboot. (RedHat ES L4) I have tried experimenting with removing the trailing slash on the path as well as including adding a direct path to my python 'site-packages' as some one suggested as a comment on the Django homepage. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Mod_python error: "PythonHandler django.core.handlers.modpython"
I tried to set-up a django project using mod_python on Apache/1.3.33 and I can only get mod_python error messages. The admin part displays the following traceback (it works fine with django-admin.py runserver): - Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py", line 193, in Dispatch result = object(req) File "/usr/local/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 164, in handler return ModPythonHandler()(req) File "/usr/local/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 139, in __call__ response = self.get_response(req.uri, request) File "/usr/local/lib/python2.4/site-packages/django/core/handlers/base.py", line 50, in get_response response = middleware_method(request) File "/usr/local/lib/python2.4/site-packages/django/middleware/sessions.py", line 56, in process_request request.session = SessionWrapper(request.COOKIES.get(SESSION_COOKIE_NAME, None)) File "/usr/local/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 53, in _get_cookies self._cookies = httpwrappers.parse_cookie(self._req.headers_in.get('cookie', '')) AttributeError: get - The regular side displays a different traceback (this also works with django-admin.py). Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py", line 193, in Dispatch result = object(req) File "/usr/local/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 164, in handler return ModPythonHandler()(req) File "/usr/local/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 139, in __call__ response = self.get_response(req.uri, request) File "/usr/local/lib/python2.4/site-packages/django/core/handlers/base.py", line 50, in get_response response = middleware_method(request) File "/usr/local/lib/python2.4/site-packages/django/middleware/common.py", line 33, in process_request if request.META.has_key('HTTP_USER_AGENT'): File "/usr/local/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 67, in _get_meta self._meta = { File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py", line 85, in __getattr__ raise AttributeError, attr AttributeError: ap_auth_type
mod_python error (help please)
I've searched through the documentation on the djangoproject page, and several of the postings here... but I have not been able to solve a mysterious mod_python problem: --snip-- Mod_python error: "PythonHandler django.core.handlers.modpython" 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 454, in import_module f, p, d = imp.find_module(parts[i], path) ImportError: No module named django --snip-- Any ideas? Cheers, Abe
Re: Django, mod_python error
On Thursday 12 Jan 2006 4:23 am, [EMAIL PROTECTED] wrote: > ImproperlyConfigured: Error importing middleware > django.middleware.sessions: "No module named resumes" have you created any models in ~/models/resumes.py? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
Re: Django, mod_python error
>> have you created any models in ~/models/resumes.py? Yep, I have a Resume model in /modes/resumes.py
Re: Django, mod_python error
I should clarify that my project does work when I run Django's server.
Re: Django, mod_python error
On Wednesday 11 January 2006 14:53, [EMAIL PROTECTED] wrote: > ImproperlyConfigured: Error importing middleware > django.middleware.sessions: "No module named resumes" Let's see your settings.py file, particularly the MIDDLEWARE_CLASSES part.
Re: Django, mod_python error
Actually, I found my error. In the INSTALLED_APPS section of the settings file, I had left of the project name, 'resumes' instead of 'myproject.resumes'. Thanks for the help, and hopefully this will help someone else out.
Re: Django, mod_python error
The same question I meet, not resolve yet
mod_python error when debug=False
I've been trying to put my site up live, and keep coming across an error (on any page on the site) whenever I set debug=False in settings.py. With the development server, or with debug=True on the production server, I don't have this problem at all. I searched for a similar problem on djangoproject and here, and found only a closed ticket (http://code.djangoproject.com/ticket/8569) with a changeset (http://code.djangoproject.com/changeset/8605) that I assume was built into the version I'm using (1.0.2-final). I downloaded the changeset anyway, and substituted it, but it didn't help. Below is my mod_python traceback. Any help would be GREATLY appreciated! Thanks!! MOD_PYTHON ERROR ProcessId: 1564 Interpreter:'poseidon.sunyopt.edu' ServerName: 'poseidon.sunyopt.edu' DocumentRoot: 'C:/websites/wwwroot' URI:'/backuslab/' Location: '/backuslab/' Directory: None Filename: 'C:/websites/wwwroot/BackusLab/' PathInfo: '' Phase: 'PythonHandler' Handler:'django.core.handlers.modpython' Traceback (most recent call last): File "C:\Program Files\Python\Lib\site-packages\mod_python \importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "C:\Program Files\Python\Lib\site-packages\mod_python \importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg) File "C:\Program Files\Python\Lib\site-packages\mod_python \importer.py", line 1128, in _execute_target result = object(arg) File "c:\program files\python\Lib\site-packages\django\core\handlers \modpython.py", line 228, in handler return ModPythonHandler()(req) File "c:\program files\python\Lib\site-packages\django\core\handlers \modpython.py", line 201, in __call__ response = self.get_response(request) File "c:\program files\python\Lib\site-packages\django\core\handlers \base.py", line 128, in get_response return self.handle_uncaught_exception(request, resolver, exc_info) File "c:\program files\python\Lib\site-packages\django\core\handlers \base.py", line 159, in handle_uncaught_exception callback, param_dict = resolver.resolve500() File "c:\program files\python\Lib\site-packages\django\core \urlresolvers.py", line 218, in resolve500 return self._resolve_special('500') File "c:\program files\python\Lib\site-packages\django\core \urlresolvers.py", line 207, in _resolve_special callback = getattr(self.urlconf_module, 'handler%s' % view_type) File "c:\program files\python\Lib\site-packages\django\core \urlresolvers.py", line 198, in _get_urlconf_module self._urlconf_module = __import__(self.urlconf_name, {}, {}, ['']) File "c:/websites/django/backuslab\laboratory\urls.py", line 5, in admin.autodiscover() File "c:\program files\python\Lib\site-packages\django\contrib\admin \__init__.py", line 40, in autodiscover __import__("%s.admin" % app) File "c:/websites/django/backuslab\laboratory\people\admin.py", line 107, in class PersonForm(forms.ModelForm): File "c:\program files\python\Lib\site-packages\django\forms \models.py", line 195, in __new__ opts.exclude, formfield_callback) File "c:\program files\python\Lib\site-packages\django\forms \models.py", line 162, in fields_for_model formfield = formfield_callback(f) File "c:\program files\python\Lib\site-packages\django\forms \models.py", line 177, in lambda f: f.formfield()) File "c:\program files\python\Lib\site-packages\django\db\models \fields\related.py", line 914, in formfield defaults = {'form_class': forms.ModelMultipleChoiceField, 'queryset': self.rel.to._default_manager.complex_filter (self.rel.limit_choices_to)} AttributeError: 'str' object has no attribute '_default_manager' --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Mod_python error: "PythonHandler django.core.handlers.modpython"
Make sure if you have django/core directory correctly installed. Also note that some tools, including rsync, excludes files named CVS, RCS, .svn, core and so on automatically. temnoregg wrote: trying to solve the for couple of hours with no success: Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/mod_python/apache.py", line 287, in HandlerDispatch log=debug) File "/usr/lib/python2.5/site-packages/mod_python/apache.py", line 461, in import_module f, p, d = imp.find_module(parts[i], path) ImportError: No module named core mod_python works with. mod_python.testhandler django works as developement server and also import in python interpreter > -- Yasushi Masuda http://ymasuda.jp/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Mod_python error: "PythonHandler django.core.handlers.modpython"
Are they both installed into the same python version? Maybe you installed Django into python 2.4, and mod_python into python 2.5 (at least it appears to be in 2.5). From what I looked at I thought django was best installed in 2.4 (sorry, I don't recall where I saw that). Of course then mod_python will also probably need to be in 2.4 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Mod_python error: "PythonHandler django.core.handlers.modpython"
Apache version Apache Apache threaded MPM No (single thread MPM) Apache forked MPM Yes, maximum 256 processes Apache server root /usr/local/apache2 Apache document root/home/hosting/kolokolo_beta/subdomains/bikeshop Apache error log/home/hosting/kolokolo_beta/logs/errors.log (view last 100 lines) Python sys.version 2.5 (r25:51908, Jan 8 2007, 22:42:04) [GCC 3.3.5 (Debian 1:3.3.5-13)] Python sys.path /home/hosting/kolokolo_beta/subdomains/ /usr/local/lib/python2.5/site-packages/django/ /usr/lib/python2.5/site-packages/setuptools-0.6c3-py2.5.egg /usr/lib/python2.5/site-packages/flup-0.5-py2.5.egg /usr/lib/python2.5/site-packages/Django-0.95-py2.5.egg /usr/lib/python25.zip /usr/lib/python2.5 /usr/lib/python2.5/plat-linux2 /usr/lib/python2.5/lib-tk /usr/lib/python2.5/lib-dynload /usr/lib/python2.5/site-packages Python interpreter name www2.kolokolo.cz mod_python.publisher available Yes mod_python.psp availableYes On Jan 9, 11:41 am, "mtnpaul" <[EMAIL PROTECTED]> wrote: > Are they both installed into the same python version? Maybe you > installed Django into python 2.4, andmod_pythoninto python 2.5 (at > least it appears to be in 2.5). From what I looked at I thought django > was best installed in 2.4 (sorry, I don't recall where I saw that). Of > course thenmod_pythonwill also probably need to be in 2.4 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Mod_python error after reboot
bump. as stipulated. there was no change in the django setting or at the server level between the time it was working and the reboot. it looks like a PYTHONPATH error but the python path is present. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Mod_python error: "PythonHandler django.core.handlers.modpython"
Sorry, I seem to have forgotten to close my message properly. I've tried searching for information about this, but I was unable to find anything obvious and it's a little bit beyond my knowledge of Apache. Does anyone have any ideas what I might try to make this work? Thanks, Bradley Peters
Re: Mod_python error: "PythonHandler django.core.handlers.modpython"
Hi, I believe that there are some problems with mod_python for apache 1.3. I'm using apache2 and mod_python 3.1 (just what comes with debian by default). And all seems to work fine. I know, if you have no reason to go to apache2 this sucks a bit but there is always proxypass :-) On 9/18/05, moberley <[EMAIL PROTECTED]> wrote: > > Sorry, I seem to have forgotten to close my message properly. > > I've tried searching for information about this, but I was unable to > find anything obvious and it's a little bit beyond my knowledge of > Apache. Does anyone have any ideas what I might try to make this work? > > Thanks, > Bradley Peters > >
Re: Mod_python error: "PythonHandler django.core.handlers.modpython"
Jakub, Thank you for the suggestion. I was able to have the server I'm using with Django switched to Apache2 and that did in fact solve the problem I was having with mod_python. Thanks, Bradley Peters.
Re: mod_python error (help please)
Abe wrote: ImportError: No module named django Looks like your Python installation doesn't see Django. Read this guide: http://www.djangoproject.com/documentation/install/ Near the end in 'Installing the development version' item 3 should help
Re: mod_python error (help please)
Maniac, Thanks for your quick response and the reference. I looked into the symlinking going on... I'm not entirely sure what the root cause was, but I deleted the symlink, copied the files to the ...site-packages directory and viola! everything is cool. Cheers, Abe
Re: mod_python error (help please)
It might be a security problem. Probably Apache is set not to follow symlinks or www user has no permissions on the files.
Re: mod_python error (help please)
rapto wrote: It might be a security problem. Probably Apache is set not to follow symlinks It's not Apache's thing. It's Python that searchs for Django modules and can't find them. It might be just incorrectly created symlink. I also don't think it could pose any security risc since Python itself is not inside www path anyway (unless someone moved it there :-) ).
mod_python Error After mysqlhotcopy --help!!!
Hi All, As for a I know, all I did was use mysqlhotcopy to backup some data and now my whole site is down. Are there any issues with this? This site is supposed to go live in 24hrs. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: mod_python error when debug=False
On Fri, Feb 27, 2009 at 11:46 AM, Michael Repucci wrote: > > I've been trying to put my site up live, and keep coming across an > error (on any page on the site) whenever I set debug=False in > settings.py. With the development server, or with debug=True on the > production server, I don't have this problem at all. I searched for a > similar problem on djangoproject and here, and found only a closed > ticket (http://code.djangoproject.com/ticket/8569) with a changeset > (http://code.djangoproject.com/changeset/8605) that I assume was built > into the version I'm using (1.0.2-final). I downloaded the changeset > anyway, and substituted it, but it didn't help. Below is my mod_python > traceback. Any help would be GREATLY appreciated! Thanks!! > That changeset was before 1.0, so yes you should have already had it. You seem to have found a different path to the same ultimate error situation. > MOD_PYTHON ERROR > > ProcessId: 1564 > Interpreter:'poseidon.sunyopt.edu' > > ServerName: 'poseidon.sunyopt.edu' > DocumentRoot: 'C:/websites/wwwroot' > > URI:'/backuslab/' > Location: '/backuslab/' > Directory: None > Filename: 'C:/websites/wwwroot/BackusLab/' > PathInfo: '' > > Phase: 'PythonHandler' > Handler:'django.core.handlers.modpython' > > Traceback (most recent call last): > > File "C:\Program Files\Python\Lib\site-packages\mod_python > \importer.py", line 1537, in HandlerDispatch >default=default_handler, arg=req, silent=hlist.silent) > > File "C:\Program Files\Python\Lib\site-packages\mod_python > \importer.py", line 1229, in _process_target >result = _execute_target(config, req, object, arg) > > File "C:\Program Files\Python\Lib\site-packages\mod_python > \importer.py", line 1128, in _execute_target >result = object(arg) > > File "c:\program files\python\Lib\site-packages\django\core\handlers > \modpython.py", line 228, in handler >return ModPythonHandler()(req) > > File "c:\program files\python\Lib\site-packages\django\core\handlers > \modpython.py", line 201, in __call__ >response = self.get_response(request) > > File "c:\program files\python\Lib\site-packages\django\core\handlers > \base.py", line 128, in get_response >return self.handle_uncaught_exception(request, resolver, exc_info) > This is the first indication of a problem, something raised an exception trying to generate a response. Don't know if it is the same as the exception you are ultimately seeing or if something else went wrong. > > File "c:\program files\python\Lib\site-packages\django\core\handlers > \base.py", line 159, in handle_uncaught_exception >callback, param_dict = resolver.resolve500() > > File "c:\program files\python\Lib\site-packages\django\core > \urlresolvers.py", line 218, in resolve500 >return self._resolve_special('500') > > File "c:\program files\python\Lib\site-packages\django\core > \urlresolvers.py", line 207, in _resolve_special >callback = getattr(self.urlconf_module, 'handler%s' % view_type) > > File "c:\program files\python\Lib\site-packages\django\core > \urlresolvers.py", line 198, in _get_urlconf_module >self._urlconf_module = __import__(self.urlconf_name, {}, {}, ['']) > So here the code that is attempting to handle the uncaught exception goes to load your url configuration as part of figuring what to call to generate the 500 response. > File "c:/websites/django/backuslab\laboratory\urls.py", line 5, in > >admin.autodiscover() > > File "c:\program files\python\Lib\site-packages\django\contrib\admin > \__init__.py", line 40, in autodiscover >__import__("%s.admin" % app) > And that calls admin.autodiscover(), which was also present in the earlier tracebacks. But after that the traceback from #8596 doesn't match well with what we see called here. The #8596 traceback proceeded into validate(), which is only called if DEBUG is True, and that is where the fix was put. In this case you're not going into validate(), but rather are encountering the error just on defining a ModelForm. > > File "c:/websites/django/backuslab\laboratory\people\admin.py", line > 107, in >class PersonForm(forms.ModelForm): > > File "c:\program files\python\Lib\site-packages\django\forms > \models.py", line 195, in __new__ >opts.exclude, formfield_callback) > > File "c:\program files\python\Lib\site-packages\django\fo
Re: mod_python error when debug=False
orm save_model = save_model_method has_change_permission = has_change_permission_method def queryset(self, request): return queryset_method(self, request, Person) def has_add_permission(self, request): return has_add_permission_method(self, request, Person) def get_form(self, request, obj=None, **kwargs): return get_form_method(self, request, obj, self.exclude_list, **kwargs) def changelist_view(self, request, extra_context=None): return changelist_view_method(self, request, extra_context, self.exclude_list, self.list_display_list) class TitleAdmin(admin.ModelAdmin): list_display = ('name',) search_fields = ['name'] admin.site.register(Contact, ContactAdmin) admin.site.register(Person, PersonAdmin) admin.site.register(Title, TitleAdmin) On Fri, Feb 27, 2009 at 11:38 PM, Karen Tracey wrote: > On Fri, Feb 27, 2009 at 11:46 AM, Michael Repucci wrote: > >> >> I've been trying to put my site up live, and keep coming across an >> error (on any page on the site) whenever I set debug=False in >> settings.py. With the development server, or with debug=True on the >> production server, I don't have this problem at all. I searched for a >> similar problem on djangoproject and here, and found only a closed >> ticket (http://code.djangoproject.com/ticket/8569) with a changeset >> (http://code.djangoproject.com/changeset/8605) that I assume was built >> into the version I'm using (1.0.2-final). I downloaded the changeset >> anyway, and substituted it, but it didn't help. Below is my mod_python >> traceback. Any help would be GREATLY appreciated! Thanks!! >> > > That changeset was before 1.0, so yes you should have already had it. You > seem to have found a different path to the same ultimate error situation. > > >> MOD_PYTHON ERROR >> >> ProcessId: 1564 >> Interpreter:'poseidon.sunyopt.edu' >> >> ServerName: 'poseidon.sunyopt.edu' >> DocumentRoot: 'C:/websites/wwwroot' >> >> URI:'/backuslab/' >> Location: '/backuslab/' >> Directory: None >> Filename: 'C:/websites/wwwroot/BackusLab/' >> PathInfo: '' >> >> Phase: 'PythonHandler' >> Handler:'django.core.handlers.modpython' >> >> Traceback (most recent call last): >> >> File "C:\Program Files\Python\Lib\site-packages\mod_python >> \importer.py", line 1537, in HandlerDispatch >>default=default_handler, arg=req, silent=hlist.silent) >> >> File "C:\Program Files\Python\Lib\site-packages\mod_python >> \importer.py", line 1229, in _process_target >>result = _execute_target(config, req, object, arg) >> >> File "C:\Program Files\Python\Lib\site-packages\mod_python >> \importer.py", line 1128, in _execute_target >>result = object(arg) >> >> File "c:\program files\python\Lib\site-packages\django\core\handlers >> \modpython.py", line 228, in handler >>return ModPythonHandler()(req) >> >> File "c:\program files\python\Lib\site-packages\django\core\handlers >> \modpython.py", line 201, in __call__ >>response = self.get_response(request) >> >> File "c:\program files\python\Lib\site-packages\django\core\handlers >> \base.py", line 128, in get_response >>return self.handle_uncaught_exception(request, resolver, exc_info) >> > > This is the first indication of a problem, something raised an exception > trying to generate a response. Don't know if it is the same as the > exception you are ultimately seeing or if something else went wrong. > > >> >> File "c:\program files\python\Lib\site-packages\django\core\handlers >> \base.py", line 159, in handle_uncaught_exception >>callback, param_dict = resolver.resolve500() >> >> File "c:\program files\python\Lib\site-packages\django\core >> \urlresolvers.py", line 218, in resolve500 >>return self._resolve_special('500') >> >> File "c:\program files\python\Lib\site-packages\django\core >> \urlresolvers.py", line 207, in _resolve_special >>callback = getattr(self.urlconf_module, 'handler%s' % view_type) >> >> File "c:\program files\python\Lib\site-packages\django\core >> \urlresolvers.py", line 198, in _get_urlconf_module >>self._urlconf_module = __import__(self.urlconf_name, {}, {}, ['']) >> > > So here the code that is attempting to handle the
Re: mod_python error when debug=False
using syntax like this : contact = models.ForeignKey("Contact" was causing me to fail earlier today at the exact same line. her response to me was "Why are you using quoted strings instead of direct references to the target models here and in the OneToOneField in VoipGateway? I don't understand why it isn't working, but it also doesn't appear to be necessary in your case (you don't have circular references" sure enough, I got rid of the quoted strings and it began to work. Worth a shot anyway, if you don't need the circular references. --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: mod_python error when debug=False
Hey thanks Danny!! That worked! The quoted strings syntax should be permissible, and works just fine with DEBUG=True, or on the development server. I'd say this should be a new ticket, but what do I know. I'm just a user not a developer. Anyway, thanks again! On Mon, Mar 2, 2009 at 3:17 PM, Danny Brown wrote: > > using syntax like this : contact = models.ForeignKey("Contact" was > causing me to fail earlier today at the exact same line. > her response to me was "Why are you using quoted strings instead of > direct references to the target models here and in the OneToOneField > in VoipGateway? I don't understand why it isn't working, but it also > doesn't appear to be necessary in your case (you don't have circular > references" > > sure enough, I got rid of the quoted strings and it began to work. > Worth a shot anyway, if you don't need the circular references. > > > > --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: mod_python error when debug=False
Thanks to Karen, She figured it out. I guess she will know if it should be a ticket. I am like you. I sure don't know. On Mon, Mar 2, 2009 at 2:43 PM, Michael A. Repucci wrote: > Hey thanks Danny!! That worked! The quoted strings syntax should be > permissible, and works just fine with DEBUG=True, or on the development > server. I'd say this should be a new ticket, but what do I know. I'm just a > user not a developer. Anyway, thanks again! > > > On Mon, Mar 2, 2009 at 3:17 PM, Danny Brown wrote: >> >> using syntax like this : contact = models.ForeignKey("Contact" was >> causing me to fail earlier today at the exact same line. >> her response to me was "Why are you using quoted strings instead of >> direct references to the target models here and in the OneToOneField >> in VoipGateway? I don't understand why it isn't working, but it also >> doesn't appear to be necessary in your case (you don't have circular >> references" >> >> sure enough, I got rid of the quoted strings and it began to work. >> Worth a shot anyway, if you don't need the circular references. >> >> > > > > > --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: mod_python error when debug=False
On Mon, Mar 2, 2009 at 3:48 PM, Danny Brown wrote: > > Thanks to Karen, She figured it out. I guess she will know if it > should be a ticket. I am like you. I sure don't know. > Probably worth a ticket so it doesn't get forgotten; I won't be able to experiment with an Apache setup until the weekend. I think the quoted-string version should be working even in non-circular cases where you don't absolutely need it, but don't really have time to look into it deeply at the moment. It would be useful if you (or whoever opens a ticket) could pare down the models involved into a minimal example that fails for recreation purposes. Thanks, Karen --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: mod_python error when debug=False
I guess I will try tomorrow . Don't know if I know enough about Django to make an intelligent submittal but will try. On Mon, Mar 2, 2009 at 3:43 PM, Karen Tracey wrote: > On Mon, Mar 2, 2009 at 3:48 PM, Danny Brown wrote: >> >> Thanks to Karen, She figured it out. I guess she will know if it >> should be a ticket. I am like you. I sure don't know. > > Probably worth a ticket so it doesn't get forgotten; I won't be able to > experiment with an Apache setup until the weekend. I think the > quoted-string version should be working even in non-circular cases where you > don't absolutely need it, but don't really have time to look into it deeply > at the moment. It would be useful if you (or whoever opens a ticket) could > pare down the models involved into a minimal example that fails for > recreation purposes. > > Thanks, > Karen > > > > --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: mod_python Error After mysqlhotcopy --help!!!
[EMAIL PROTECTED] wrote: > As for a I know, all I did was use mysqlhotcopy to backup some data and > now my whole site is down. > > Are there any issues with this? > > This site is supposed to go live in 24hrs. Wow, that sounds terrible -- I'm so sorry! There's nothing in Django that would cause this, so my immediate answer is that you should ask the mysql folks about it. If you can post more details about exactly what error messages your getting, someone here might know enough to help you out. Good luck, Jacob --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: mod_python Error After mysqlhotcopy --help!!!
Got this resolved. The sql folks changed the mysql user password and did not tell me! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
MOD_PYTHON ERROR - but appears more related to MySQLdb
I have been able to get django working with the development server. I'm pulling my hair out trying to get it working on my osx 10.4 box with apache/mod_python/mysqldb I have confirmed that apache works, mod_python works, and mysqldb work stand alone. I was following the django book and created the time example and was able to browse to it through the development server at http://127.0.0.1:8000/time/. I then try to go to it through apache at http://127.0.0.1/mysite/time/ and I get these errors and I feel like I have tried everything (rebuilding mysqldb etcwith a modified _mysql.c without etc) I keep getting: ImproperlyConfigured: Error loading MySQLdb module: bad local file header in /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg Any help would be much appreciated. Here is the full error: MOD_PYTHON ERROR ProcessId: 1439 Interpreter:'www.myserver.dev' ServerName: 'www.myserver.dev' DocumentRoot: '/Library/WebServer/Documents' URI:'/mysite/time/' Location: '/mysite/' Directory: None Filename: '/Library/WebServer/Documents/mysite' PathInfo: '/time/' Phase: 'PythonHandler' Handler:'django.core.handlers.modpython' Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/django/core/handlers/modpython.py", line 189, in handler return ModPythonHandler()(req) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/django/core/handlers/modpython.py", line 162, in __call__ response = self.get_response(request) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/django/core/handlers/base.py", line 64, in get_response response = middleware_method(request) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/django/contrib/sessions/middleware.py", line 13, in process_request engine = __import__(settings.SESSION_ENGINE, {}, {}, ['']) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/django/contrib/sessions/backends/db.py", line 2, in from django.contrib.sessions.models import Session File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/django/contrib/sessions/models.py", line 5, in from django.db import models File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/django/db/__init__.py", line 17, in backend = __import__('%s%s.base' % (_import_path, settings.DATABASE_ENGINE), {}, {}, ['']) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/django/db/backends/mysql/base.py", line 12, in raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) ImproperlyConfigured: Error loading MySQLdb module: bad local file header in /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Mod_python error: AttributeError: 'str' object has no attribute 'status_code'
Help. I'm a bit of an apache/mod_python noob and am not sure what is causing this error. I get this at page load every so often (not all the time). Sometimes the page loads fine and sometimes it throws this exception. Guessing from the fact that this occurs only sometimes, perhaps this is a load/scaling issue with mod_python? It's happening in my production system where I do get a lot of hits. Any input/advice would be much appreciated. Cheers, Nihaar MOD_PYTHON ERROR Traceback (most recent call last): File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg) File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg) File "/usr/lib/python2.6/site-packages/django/core/handlers/ modpython.py", line 228, in handler return ModPythonHandler()(req) File "/usr/lib/python2.6/site-packages/django/core/handlers/ modpython.py", line 205, in __call__ response = middleware_method(request, response) File "/usr/lib/python2.6/site-packages/django/middleware/common.py", line 83, in process_response if response.status_code == 404: AttributeError: 'str' object has no attribute 'status_code' -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: MOD_PYTHON ERROR - but appears more related to MySQLdb
This was probably because I didn't read enough at: http://www.djangoproject.com/documentation/modpython/ Following the instructions for: Using eggs with mod_python sorted out the issue. I had to add the PythonInterpreter and the PythonImport directives and set them to my site. On Apr 19, 11:26 am, jmat <[EMAIL PROTECTED]> wrote: > I have been able to get django working with the development server. > I'm pulling my hair out trying to get it working on my osx 10.4 box > with apache/mod_python/mysqldb > > I have confirmed that apache works, mod_python works, and mysqldb work > stand alone. > > I was following the django book and created the time example and was > able to browse to it through the development server > athttp://127.0.0.1:8000/time/. > I then try to go to it through apache athttp://127.0.0.1/mysite/time/ > and I get these errors and I feel like I have tried everything > (rebuilding mysqldb etcwith a modified _mysql.c without etc) I > keep getting: > > ImproperlyConfigured: Error loading MySQLdb module: bad local file > header in /Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg > > Any help would be much appreciated. > > Here is the full error: > > MOD_PYTHON ERROR > > ProcessId: 1439 > Interpreter:'www.myserver.dev' > > ServerName: 'www.myserver.dev' > DocumentRoot: '/Library/WebServer/Documents' > > URI:'/mysite/time/' > Location: '/mysite/' > Directory: None > Filename: '/Library/WebServer/Documents/mysite' > PathInfo: '/time/' > > Phase: 'PythonHandler' > Handler:'django.core.handlers.modpython' > > Traceback (most recent call last): > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/mod_python/importer.py", line 1537, in > HandlerDispatch > default=default_handler, arg=req, silent=hlist.silent) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/mod_python/importer.py", line 1229, in > _process_target > result = _execute_target(config, req, object, arg) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/mod_python/importer.py", line 1128, in > _execute_target > result = object(arg) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/core/handlers/modpython.py", line 189, > in handler > return ModPythonHandler()(req) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/core/handlers/modpython.py", line 162, > in __call__ > response = self.get_response(request) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/core/handlers/base.py", line 64, in > get_response > response = middleware_method(request) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/contrib/sessions/middleware.py", line > 13, in process_request > engine = __import__(settings.SESSION_ENGINE, {}, {}, ['']) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/contrib/sessions/backends/db.py", line > 2, in > from django.contrib.sessions.models import Session > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/contrib/sessions/models.py", line 5, in > > from django.db import models > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/db/__init__.py", line 17, in > backend = __import__('%s%s.base' % (_import_path, > settings.DATABASE_ENGINE), {}, {}, ['']) > > File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/django/db/backends/mysql/base.py", line 12, in > > raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) > > ImproperlyConfigured: Error loading MySQLdb module: bad local file > header in /Library/Frameworks/Python.framework/Versions/2.5/lib/ > python2.5/site-packages/MySQL_python-1.2.2-py2.5-macosx-10.3-fat.egg --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Mod_python error: AttributeError: 'str' object has no attribute 'status_code'
On 5 avr, 21:49, Nihaar Gupta wrote: > Help. I'm a bit of an apache/mod_python noob and am not sure what is > causing this error. I get this at page load every so often (not all > the time). Sometimes the page loads fine and sometimes it throws this > exception. > > Guessing from the fact that this occurs only sometimes, perhaps this > is a load/scaling issue with mod_python? It's happening in my > production system where I do get a lot of hits. > > Any input/advice would be much appreciated. > > Cheers, > Nihaar > > MOD_PYTHON ERROR > > Traceback (most recent call last): > > File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", > line 1537, in HandlerDispatch > default=default_handler, arg=req, silent=hlist.silent) > > File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", > line 1229, in _process_target > result = _execute_target(config, req, object, arg) > > File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", > line 1128, in _execute_target > result = object(arg) > > File "/usr/lib/python2.6/site-packages/django/core/handlers/ > modpython.py", line 228, in handler > return ModPythonHandler()(req) > > File "/usr/lib/python2.6/site-packages/django/core/handlers/ > modpython.py", line 205, in __call__ > response = middleware_method(request, response) > > File "/usr/lib/python2.6/site-packages/django/middleware/common.py", > line 83, in process_response > if response.status_code == 404: > > AttributeError: 'str' object has no attribute 'status_code' Obviously a string is returned instead of a response object. Does it always happen on the same view, or is it a random error ? Anyway : the best way to trace the problem would be to add a couple lines of code around line 83 to catch the exception and log the offending string *and* the whole traceback. My 2 cents... -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Mod_Python Error - ImproperlyConfigured: Error loading psycopg module: No module named psycopg
Hi! I am trying to configure Apache to use facbackopan directory as a django project, and have the following mod_python error message. Help would be very appreciated. Thanks in advance! MOD_PYTHON ERROR ProcessId: 2208 Interpreter:'LocalHost' ServerName: 'LocalHost' DocumentRoot: 'C:/Program Files/Apache Software Foundation/Apache2.2/ htdocs' URI:'/catalog' Location: '/catalog' Directory: None Filename: 'C:/Program Files/Apache Software Foundation/Apache2.2/ htdocs/catalog' PathInfo: '' Phase: 'PythonHandler' Handler:'django.core.handlers.modpython' Traceback (most recent call last): File "C:\Python25\Lib\site-packages\mod_python\importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "C:\Python25\Lib\site-packages\mod_python\importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg) File "C:\Python25\Lib\site-packages\mod_python\importer.py", line 1128, in _execute_target result = object(arg) File "C:\Python25\Lib\site-packages\django\core\handlers \modpython.py", line 178, in handler return ModPythonHandler()(req) File "C:\Python25\Lib\site-packages\django\core\handlers \modpython.py", line 146, in __call__ self.load_middleware() File "C:\Python25\Lib\site-packages\django\core\handlers\base.py", line 29, in load_middleware mod = __import__(mw_module, {}, {}, ['']) File "C:\Python25\Lib\site-packages\django\contrib\sessions \middleware.py", line 2, in from django.contrib.sessions.models import Session File "C:\Python25\Lib\site-packages\django\contrib\sessions \models.py", line 3, in from django.db import models File "C:\Python25\Lib\site-packages\django\db\__init__.py", line 11, in backend = __import__('django.db.backends.%s.base' % settings.DATABASE_ENGINE, {}, {}, ['']) File "C:\Python25\Lib\site-packages\django\db\backends\postgresql \base.py", line 13, in raise ImproperlyConfigured, "Error loading psycopg module: %s" % e ImproperlyConfigured: Error loading psycopg module: No module named psycopg --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Mod_Python Error - ImproperlyConfigured: Error loading psycopg module: No module named psycopg
2007/12/4, AY <[EMAIL PROTECTED]>: > > Hi! I am trying to configure Apache to use facbackopan directory as a > django project, and have the following mod_python error message. Help > would be very appreciated. Thanks in advance! > Hi. > > MOD_PYTHON ERROR > > ImproperlyConfigured: Error loading psycopg module: No module named > psycopg I think that you have an error in the psycopg module. Are you sure it is installed correctly? Can you use it outside django? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Mod_Python Error - ImproperlyConfigured: Error loading psycopg module: No module named psycopg
Good Morning, Thanks for reply my request! Can you show me where/how to detect the error in psycopg module and how to fix the problem. I have completed the following steps without any problem. (1) install Python 2.5.1 windows installer (Python 2.5.1.exe) (2) install TortoiseSVN-1.4.5.10425-win-svn-1.4.5.msi (3) Install Django 0.96 (4) Update path variables to include python path (C:\python25; C: \python25\tools\scripts;c:\python25\scripts) (5) install apache2.2.4- win32-x86-no_ssl_msi web server (6)Install mod_python-3.3.1win-py2.5- apache2.2.exe to allow apache and python to talk to each other (7) install python memchache (python-memcache-1.39.tar.gz (8) download FacBackOpac. However I got stuck at (9) configure apache to use facbackopac directory as a django project. This is my FIRST try to apply Django on opac and have no idea to solve this mod_python error. Any help will be very appreciated. Thanks! On Dec 4, 10:39 am, "Mauro Sánchez" <[EMAIL PROTECTED]> wrote: > 2007/12/4, AY <[EMAIL PROTECTED]>: > > > Hi! I am trying to configure Apache to use facbackopan directory as a > > django project, and have the following mod_python error message. Help > > would be very appreciated. Thanks in advance! > > Hi. > > > > > MOD_PYTHON ERROR > > > ImproperlyConfigured: Error loading psycopg module: No module named > > psycopg > > I think that you have an error in the psycopg module. Are you sure it > is installed correctly? Can you use it outside django? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Mod_Python Error - ImproperlyConfigured: Error loading psycopg module: No module named psycopg
On 12/5/07, AY <[EMAIL PROTECTED]> wrote: > > > Good Morning, Thanks for reply my request! Can you show me where/how > to detect the error in psycopg module and how to fix the problem. I > have completed the following steps without any problem. (1) install > Python 2.5.1 windows installer (Python 2.5.1.exe) (2) install > TortoiseSVN-1.4.5.10425-win-svn-1.4.5.msi (3) Install Django 0.96 (4) > Update path variables to include python path (C:\python25; C: > \python25\tools\scripts;c:\python25\scripts) (5) install apache2.2.4- > win32-x86-no_ssl_msi web server (6)Install mod_python-3.3.1win-py2.5- > apache2.2.exe to allow apache and python to talk to each other (7) > install python memchache (python-memcache-1.39.tar.gz (8) download > FacBackOpac. > However I got stuck at (9) configure apache to use facbackopac > directory as a django project. This is my FIRST try to apply Django on > opac and have no idea to solve this mod_python error. Any help will be > very appreciated. Thanks! The list of instructions you are following don't appear to have included the piece that lets Django use Python to access the database, that's what psycopg does. See: http://www.djangoproject.com/documentation/install/#get-your-database-running for pointers on where to get psycopg. (Nor do I see in the list so far the database itself, which you will also need. But I'm unfamiliar with facbackopac. From a quick look at its Google groups page it sounds like it provides an alternative interface to an existing catalog, so I guess maybe you already have a database with this catalog running?) Karen --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---