#12732: Change in svn revision 12098 incompatible with postgres
---------------------------------------------------+------------------------
Reporter: stevedegrace | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: SVN
Resolution: | Keywords: postgresql
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by kmtracey):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> Hello,
>
> I have found a problem in the svn trunk starting revision 12098 and later
> that causes an internal server error when using a PostgreSQL database
> backend. I will post the apache error log below. I found this after
> attempting an svn update.
>
> I just svn update -r 12097 for now to make my installation work, but I
> would love to be caught up.
>
> I hope this problem can be identified and fixed quickly... I'm afraid my
> programming skills are probably not up to the task of identifying and
> fixing the actual problem, but the sole difference between 12097 and
> 12098 seems to be in db/models/base.py, which makes sense. I'm copying
> the error log below... I'm sorry I can't be more helpful.
>
> Stephen
>
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] mod_wsgi
> (pid=12911): Exception occurred processing WSGI script
> '/home/infinite/webapps/infinite/infinite.wsgi'.
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] Traceback (most
> recent call last):
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/lib/python2.5/django/core/handlers/wsgi.py",
> line 230, in __call__
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
> self.load_middleware()
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/lib/python2.5/django/core/handlers/base.py",
> line 40, in load_middleware
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] mod =
> import_module(mw_module)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/lib/python2.5/django/utils/importlib.py",
> line 35, in import_module
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
> __import__(name)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/infinite/news/__init__.py", line 1, in
> <module>
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] from news.feeds
> import SiteNews
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/infinite/news/feeds.py", line 6, in
> <module>
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] current_site =
> Site.objects.get_current()
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/lib/python2.5/django/contrib/sites/models.py",
> line 22, in get_current
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] current_site =
> self.get(pk=sid)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/manager.py",
> line 132, in get
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] return
> self.get_query_set().get(*args, **kwargs)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/query.py",
> line 334, in get
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] num =
> len(clone)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/query.py",
> line 79, in __len__
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
> self._result_cache = list(self.iterator())
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/query.py",
> line 267, in iterator
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] for row in
> compiler.results_iter():
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/sql/compiler.py",
> line 685, in results_iter
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] for rows in
> self.execute_sql(MULTI):
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/models/sql/compiler.py",
> line 740, in execute_sql
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
> cursor.execute(sql, params)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/backends/util.py",
> line 19, in execute
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] return
> self.cursor.execute(sql, params)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
> "/home/infinite/webapps/infinite/lib/python2.5/django/db/backends/postgresql/base.py",
> line 57, in execute
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] return
> self.cursor.execute(query, args)
> [Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] NameError: global
> name 'query' is not defined
New description:
Hello,
I have found a problem in the svn trunk starting revision [12098] and
later that causes an internal server error when using a PostgreSQL
database backend. I will post the apache error log below. I found this
after attempting an svn update.
I just svn update -r 12097 for now to make my installation work, but I
would love to be caught up.
I hope this problem can be identified and fixed quickly... I'm afraid my
programming skills are probably not up to the task of identifying and
fixing the actual problem, but the sole difference between 12097 and 12098
seems to be in db/models/base.py, which makes sense. I'm copying the error
log below... I'm sorry I can't be more helpful.
Stephen
{{{
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] mod_wsgi
(pid=12911): Exception occurred processing WSGI script
'/home/infinite/webapps/infinite/infinite.wsgi'.
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/lib/python2.5/django/core/handlers/wsgi.py",
line 230, in __call__
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
self.load_middleware()
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/lib/python2.5/django/core/handlers/base.py",
line 40, in load_middleware
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] mod =
import_module(mw_module)
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/lib/python2.5/django/utils/importlib.py",
line 35, in import_module
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] __import__(name)
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/infinite/news/__init__.py", line 1, in
<module>
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] from news.feeds
import SiteNews
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/infinite/news/feeds.py", line 6, in
<module>
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] current_site =
Site.objects.get_current()
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/lib/python2.5/django/contrib/sites/models.py",
line 22, in get_current
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] current_site =
self.get(pk=sid)
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/lib/python2.5/django/db/models/manager.py",
line 132, in get
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] return
self.get_query_set().get(*args, **kwargs)
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/lib/python2.5/django/db/models/query.py",
line 334, in get
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] num = len(clone)
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/lib/python2.5/django/db/models/query.py",
line 79, in __len__
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
self._result_cache = list(self.iterator())
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/lib/python2.5/django/db/models/query.py",
line 267, in iterator
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] for row in
compiler.results_iter():
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/lib/python2.5/django/db/models/sql/compiler.py",
line 685, in results_iter
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] for rows in
self.execute_sql(MULTI):
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/lib/python2.5/django/db/models/sql/compiler.py",
line 740, in execute_sql
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1]
cursor.execute(sql, params)
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/lib/python2.5/django/db/backends/util.py",
line 19, in execute
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] return
self.cursor.execute(sql, params)
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] File
"/home/infinite/webapps/infinite/lib/python2.5/django/db/backends/postgresql/base.py",
line 57, in execute
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] return
self.cursor.execute(query, args)
[Fri Jan 29 21:09:04 2010] [error] [client 127.0.0.1] NameError: global
name 'query' is not defined
}}}
Comment:
Reformatted description. Please use preview and appropriate
WikiFormatting.
--
Ticket URL: <http://code.djangoproject.com/ticket/12732#comment:1>
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.