Thanks a lot! I found the faulty script. And it's not mod_wsgi. :)
Here is the part of the traceback Apache gave me:
[Wed Apr 06 18:31:07 2011] [error] File "/Users/max/Documents/
project/Website-Code/current/project/Models/Events/iCalendar.py", line
4, in <module>
[Wed Apr 06 18:31:07 2011] [error] import vobject
[Wed Apr 06 18:31:07 2011] [error] File "build/bdist.macosx-10.3-
i386/egg/vobject/__init__.py", line 79, in <module>
[Wed Apr 06 18:31:07 2011] [error] File "build/bdist.macosx-10.3-
i386/egg/vobject/icalendar.py", line 5, in <module>
[Wed Apr 06 18:31:07 2011] [error] File "/Library/Frameworks/
Python.framework/Versions/2.7/lib/python2.7/site-packages/
python_dateutil-2.0-py2.7.egg/dateutil/rrule.py", line 13, in <module>
[Wed Apr 06 18:31:07 2011] [error] import _thread
[Wed Apr 06 18:31:07 2011] [error] ImportError: No module named
_thread
Finding this it's easy to delete this one character too much
('_thread' changed to 'thread').
All this trouble because of one character... that's the downside of
programming. :)
Thanks again for your help! I'll contact the programmer of the
dateutil-script.
Max
On 6 Apr., 13:06, Graham Dumpleton <[email protected]> wrote:
> BTW, the logged error details will end up in the Apache error log only.
>
> Graham
>
> On 6 April 2011 21:05, Graham Dumpleton <[email protected]> wrote:
>
>
>
> > The problem with Django is that there are certain circumstances where
> > it will hide the actual error message and traceback and replace it
> > will a higher level exception, but with the traceback then being where
> > that higher level exception was raised. This is one such case.
>
> > To try and find the real location of the exception add the following
> > to your WSGI script file.
>
> > import traceback
> > import sys
>
> > def dump_exception(callable):
> > def wrapper(*args, **kwargs):
> > try:
> > return callable(*args, **kwargs)
> > except:
> > traceback.print_exception(*sys.exc_info())
> > return wrapper
>
> > import django.core.urlresolvers
>
> > urlresolvers.get_callable = dump_exception(urlresolvers.get_callable)
>
> > This wraps the call which is doing the lookup and will dump out the
> > error message it raises before the traceback gets thrown away.
>
> > Please provide the resulting traceback as am quite curious to see it
> > and what it shows.
>
> > Graham
>
> > On 6 April 2011 19:01, Max <[email protected]> wrote:
> >> Thank you for the quick response!
>
> >> I've set PYTHONVERBOSE as explained.
> >> The traceback I can offer though is the Django traceback.
> >> The Apache error log says nothing in warn level and even in debug mode
> >> it shows no python errors.
>
> >> Here is the Django traceback:
>
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/core/handlers/base.py" in get_response
> >> 111. response = callback(request,
> >> *callback_args, **callback_kwargs)
> >> File "/Users/max/Documents/project/Website-Code/current/project/
> >> views.py" in startpage
> >> 51. return render_to_response(u'start.html',
> >> {'next_events':next_events}, context_instance=RequestContext(request))
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/shortcuts/__init__.py" in render_to_response
> >> 20. return HttpResponse(loader.render_to_string(*args,
> >> **kwargs), **httpresponse_kwargs)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/loader.py" in render_to_string
> >> 188. return t.render(context_instance)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/base.py" in render
> >> 123. return self._render(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/base.py" in _render
> >> 117. return self.nodelist.render(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/base.py" in render
> >> 744. bits.append(self.render_node(node, context))
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/debug.py" in render_node
> >> 73. result = node.render(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/loader_tags.py" in render
> >> 127. return compiled_parent._render(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/base.py" in _render
> >> 117. return self.nodelist.render(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/base.py" in render
> >> 744. bits.append(self.render_node(node, context))
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/debug.py" in render_node
> >> 73. result = node.render(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/loader_tags.py" in render
> >> 64. result = block.nodelist.render(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/base.py" in render
> >> 744. bits.append(self.render_node(node, context))
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/debug.py" in render_node
> >> 73. result = node.render(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/defaulttags.py" in render
> >> 311. return self.nodelist_true.render(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/base.py" in render
> >> 744. bits.append(self.render_node(node, context))
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/debug.py" in render_node
> >> 73. result = node.render(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/defaulttags.py" in render
> >> 227. nodelist.append(node.render(context))
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/defaulttags.py" in render
> >> 313. return self.nodelist_false.render(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/base.py" in render
> >> 744. bits.append(self.render_node(node, context))
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/debug.py" in render_node
> >> 73. result = node.render(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/debug.py" in render
> >> 90. output = self.filter_expression.resolve(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/base.py" in resolve
> >> 510. obj = self.var.resolve(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/base.py" in resolve
> >> 653. value = self._resolve_lookup(context)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/template/base.py" in _resolve_lookup
> >> 698. current = current()
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/utils/functional.py" in _curried
> >> 55. return _curried_func(*(args+moreargs), **dict(kwargs,
> >> **morekwargs))
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/db/models/base.py" in get_absolute_url
> >> 887. return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' %
> >> (opts.app_label, opts.module_name), func)(self, *args, **kwargs)
> >> File "/Users/max/Documents/project/Website-Code/current/project/Models/
> >> Events/models.py" in get_absolute_url
> >> 221. return self.eventinfo.get_absolute_url()
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/utils/functional.py" in _curried
> >> 55. return _curried_func(*(args+moreargs), **dict(kwargs,
> >> **morekwargs))
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/db/models/base.py" in get_absolute_url
> >> 887. return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' %
> >> (opts.app_label, opts.module_name), func)(self, *args, **kwargs)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/db/models/__init__.py" in inner
> >> 35. return reverse(bits[0], None, *bits[1:3])
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/core/urlresolvers.py" in reverse
> >> 391. *args, **kwargs)))
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/core/urlresolvers.py" in reverse
> >> 312. possibilities = self.reverse_dict.getlist(lookup_view)
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/core/urlresolvers.py" in _get_reverse_dict
> >> 229. self._populate()
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/core/urlresolvers.py" in _populate
> >> 220. lookups.appendlist(pattern.callback, (bits,
> >> p_pattern))
> >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> >> site-packages/django/core/urlresolvers.py" in _get_callback
> >> 167. raise ViewDoesNotExist("Could not import %s. Error
> >> was: %s" % (mod_name, str(e)))
>
> >> Exception Type: TemplateSyntaxError at /
> >> Exception Value: Caught ViewDoesNotExist while rendering: Could not
> >> import project.Models.Events.views. Error was: No module named _thread
>
> >> On 5 Apr., 00:07, Graham Dumpleton <[email protected]> wrote:
> >>> Can you provide the traceback?
>
> >>> You can also try adding:
>
> >>> PYTHONVERBOSE=1
> >>> export PYTHONVERBOSE
>
> >>> into the 'envvars' file in same directory as httpd and stop/start Apache.
>
> >>> This will cause Python to log stuff about all the imports it is doing,
> >>> where it is looking etc. It may help to clarify at least where it is
> >>> looking for stuff.
>
> >>> Graham
>
> >>> On 5 April 2011 05:09, Max <[email protected]> wrote:
>
> >>> > Hi!
>
> >>> > I'm new to this group and that is my reason for...
>
> Erfahren Sie mehr »
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.