#12634: sql compiler execute: fetchone empty result with ordering_aliases fail.
---------------------------------------------------+------------------------
Reporter: [email protected] | Owner: nobody
Status: reopened | Milestone: 1.2
Component: Database layer (models, ORM) | Version: 1.2-beta
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by anonymous):
* status: closed => reopened
* version: 1.2-alpha => 1.2-beta
* resolution: invalid =>
Comment:
I'm not the original submitter. But I see this error on revision 12799 if
I run the development server with a port definition and access the server
via hostname instead of localhost. I'm trying to port my existing 1.1 app
to 1.2 beta.
If I do:
./manage.py runserver
And attempt to access {{{http://localhost:8000/admin}}} (or my app); all
is well.
If I try:
./manage.py runserver 0.0.0.0:8000
And attempt to access {{{http://<hostname>:8000/admin}}} (mind the access
via hostname; if I access localhost it works fine); I get this stack:
{{{
Traceback (most recent call last):
File "/Users/dev/workspace/myapp/lib/python2.6/site-
packages/django/core/servers/basehttp.py", line 280, in run
self.result = application(self.environ, self.start_response)
File "/Users/dev/workspace/myapp/lib/python2.6/site-
packages/django/core/servers/basehttp.py", line 674, in __call__
return self.application(environ, start_response)
File "/Users/dev/workspace/myapp/lib/python2.6/site-
packages/django/core/handlers/wsgi.py", line 245, in __call__
response = middleware_method(request, response)
File "/Users/dev/workspace/myapp/lib/python2.6/site-
packages/django/contrib/sessions/middleware.py", line 36, in
process_response
request.session.save()
File "/Users/dev/workspace/myapp/lib/python2.6/site-
packages/django/contrib/sessions/backends/db.py", line 63, in save
obj.save(force_insert=must_create)
File "/Users/dev/workspace/myapp/lib/python2.6/site-
packages/django/db/models/base.py", line 435, in save
self.save_base(using=using, force_insert=force_insert,
force_update=force_update)
File "/Users/dev/workspace/myapp/lib/python2.6/site-
packages/django/db/models/base.py", line 497, in save_base
manager.using(using).filter(pk=pk_val).exists())):
File "/Users/dev/workspace/myapp/lib/python2.6/site-
packages/django/db/models/query.py", line 491, in exists
return self.query.has_results(using=self.db)
File "/Users/dev/workspace/myapp/lib/python2.6/site-
packages/django/db/models/sql/query.py", line 386, in has_results
return bool(compiler.execute_sql(SINGLE))
File "/Users/dev/workspace/myapp/lib/python2.6/site-
packages/django/db/models/sql/compiler.py", line 733, in execute_sql
return cursor.fetchone()[:-len(self.query.ordering_aliases)]
TypeError: 'NoneType' object is unsubscriptable
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/12634#comment:4>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" 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/django-updates?hl=en.