As this clearly had something to do with the session, I just changed the
SESSION_ENGINE to file. Different error, but for the same reason, I think:

Traceback (most recent call last):

  File "/usr/lib/pymodules/python2.6/django/core/servers/basehttp.py",
line 279, in run

    self.result = application(self.environ, self.start_response)

  File "/usr/lib/pymodules/python2.6/django/core/servers/basehttp.py",
line 651, in __call__
    return self.application(environ, start_response)

  File "/usr/lib/pymodules/python2.6/django/core/handlers/wsgi.py",
line 241, in __call__
    response = self.get_response(request)

  File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py",
line 73, in get_response

    response = middleware_method(request)

  File "/web/mysite/cms/middleware/user.py", line 10, in process_request
    set_current_user(getattr(request, 'user', None))

  File "/usr/lib/pymodules/python2.6/django/contrib/auth/middleware.py",
line 9, in __get__

    request._cached_user = get_user(request)

  File "/usr/lib/pymodules/python2.6/django/contrib/auth/__init__.py",
line 84, in get_user
    user_id = request.session[SESSION_KEY]

  File "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/base.py",
line 46, in __getitem__

    return self._session[key]

  File "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/base.py",
line 172, in _get_session
    self._session_cache = self.load()

  File "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/file.py",
line 48, in load

    session_file = open(self._key_to_file(), "rb")

  File "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/file.py",
line 43, in _key_to_file
    return os.path.join(self.storage_path, self.file_prefix + session_key)

TypeError: cannot concatenate 'str' and 'StringMorsel' objects


Any ideas what a StringMorsel is and why it's jamming up the works?


On Tue, Sep 29, 2009 at 11:22 AM, Oli Warner <o...@thepcspy.com> wrote:

> I've been building a site for a couple of months, on and off. Today when I
> log in, everything blows up. The core part appears to come from calling
> request.user. That trickles through the database (I assume to get the actual
> user object) and detonates with a *InterfaceError: Error binding parameter
> 0 - probably unsupported type*. (Full trace later on)
>
> Never seen this error before and it's scaring the hell out of me.
>
> Now I've rolled back the code (not the database) to working code and it's
> still not working. If I do roll back the database, I'm going to lose data
> (yes, I should version the data better) so I'm trying to figure out if it's
> actually something wrong with it before nuking it.
>
> Here's a trace (don't worry that it's middleware - I've already tested it
> without this middleware and django's own auth middleware explodes doing the
> same thing):
>
> Traceback (most recent call last):
>
>
>   File "/usr/lib/pymodules/python2.6/django/core/servers/basehttp.py", line 
> 279, in run
>     self.result = application(self.environ, self.start_response)
>
>   File "/usr/lib/pymodules/python2.6/django/core/servers/basehttp.py", line 
> 651, in __call__
>
>
>     return self.application(environ, start_response)
>
>   File "/usr/lib/pymodules/python2.6/django/core/handlers/wsgi.py", line 241, 
> in __call__
>     response = self.get_response(request)
>
>   File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py", line 73, 
> in get_response
>
>
>     response = middleware_method(request)
>
>   File "/web/mysite/cms/middleware/user.py", line 10, in process_request
>     set_current_user(getattr(request, 'user', None))
>
>   File "/usr/lib/pymodules/python2.6/django/contrib/auth/middleware.py", line 
> 9, in __get__
>
>
>     request._cached_user = get_user(request)
>
>   File "/usr/lib/pymodules/python2.6/django/contrib/auth/__init__.py", line 
> 84, in get_user
>     user_id = request.session[SESSION_KEY]
>
>   File 
> "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/base.py", line 
> 46, in __getitem__
>
>
>     return self._session[key]
>
>   File 
> "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/base.py", line 
> 172, in _get_session
>     self._session_cache = self.load()
>
>   File "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/db.py", 
> line 16, in load
>
>
>     expire_date__gt=datetime.datetime.now()
>
>   File "/usr/lib/pymodules/python2.6/django/db/models/manager.py", line 120, 
> in get
>     return self.get_query_set().get(*args, **kwargs)
>
>   File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 300, in 
> get
>
>
>     num = len(clone)
>
>   File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 81, in 
> __len__
>     self._result_cache = list(self.iterator())
>
>   File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 238, in 
> iterator
>
>
>     for row in self.query.results_iter():
>
>   File "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py", line 
> 287, in results_iter
>     for rows in self.execute_sql(MULTI):
>
>   File "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py", line 
> 2369, in execute_sql
>
>
>     cursor.execute(sql, params)
>
>   File "/usr/lib/pymodules/python2.6/django/db/backends/util.py", line 19, in 
> execute
>     return self.cursor.execute(sql, params)
>
>   File "/usr/lib/pymodules/python2.6/django/db/backends/sqlite3/base.py", 
> line 193, in execute
>
>
>     return Database.Cursor.execute(self, query, params)
>
> InterfaceError: Error binding parameter 0 - probably unsupported type.
>
>
>

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