Hello,

I am experiencing an error that I think may be related to my system
configuration, but is difficult to determine.  The minimal error
occurs when I try to: 1. import a certain module into views.py AND 2.
attempt to access the authentication system using the @login decorator
in the views.py.  The module imports and runs properly in the python
shell, but when combined with the authentication request in the
views.py, causes the error traceback shown below.  The error does not
occur when you do just either one of the above (import the module OR
use the login decorator).  Finally, the error is intermittent, even
after a fresh server restart – the page loads properly some times, but
other times it gives me the error page shown below.

The module I am importing into the views.py uses the python lucene
module (Apache Lucene).
This problem also occurs when using the development server.
Interestingly, I did not have this problem in version 0.96, prior to
upgrading.

Initially I was using mod_python when I came across this error.
Switching to mod_wsgi did not change anything.

Any suggestions would be greatly appreciated.

Thanks,
MB

Software Configuration:

mysql version 5.0.51a SUSE RPM
python version 2.5.2
linux SUSE
django 1.0.2
mod_wsgi
apache 2.2
MySQL_python-1.2.2


Environment:

Request Method: GET
Django Version: 1.0.2 final
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'web',
 'test_request',
'django.contrib.admin']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.doc.XViewMiddleware')


Traceback:
File "/usr/local/lib/python2.5/site-packages/django/core/handlers/
base.py" in get_response
  86.                 response = callback(request, *callback_args,
**callback_kwargs)
File "/usr/local/lib/python2.5/site-packages/django/contrib/auth/
decorators.py" in __call__
  66.         if self.test_func(request.user):
File "/usr/local/lib/python2.5/site-packages/django/contrib/auth/
middleware.py" in __get__
  5.             request._cached_user = get_user(request)
File "/usr/local/lib/python2.5/site-packages/django/contrib/auth/
__init__.py" in get_user
  83.         user_id = request.session[SESSION_KEY]
File "/usr/local/lib/python2.5/site-packages/django/contrib/sessions/
backends/base.py" in __getitem__
  46.         return self._session[key]
File "/usr/local/lib/python2.5/site-packages/django/contrib/sessions/
backends/base.py" in _get_session
  172.                 self._session_cache = self.load()
File "/usr/local/lib/python2.5/site-packages/django/contrib/sessions/
backends/db.py" in load
  16.                 expire_date__gt=datetime.datetime.now()
File "/usr/local/lib/python2.5/site-packages/django/db/models/
manager.py" in get
  93.         return self.get_query_set().get(*args, **kwargs)
File "/usr/local/lib/python2.5/site-packages/django/db/models/
query.py" in get
  303.         clone = self.filter(*args, **kwargs)
File "/usr/local/lib/python2.5/site-packages/django/db/models/
query.py" in filter
  489.         return self._filter_or_exclude(False, *args, **kwargs)
File "/usr/local/lib/python2.5/site-packages/django/db/models/
query.py" in _filter_or_exclude
  503.         clone = self._clone()
File "/usr/local/lib/python2.5/site-packages/django/db/models/
query.py" in _clone
  601.         query = self.query.clone()
File "/usr/local/lib/python2.5/site-packages/django/db/models/sql/
query.py" in clone
  195.         obj.__dict__.update(kwargs)

Exception Type: TypeError at /test_request/
Exception Value: descriptor '__dict__' for 'Empty' objects doesn't
apply to 'BaseQuery' object

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to