Opened 15 years ago

Closed 15 years ago

#12732 closed (fixed)

Change in svn revision 12098 incompatible with postgres

Reported by: stevedegrace Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords: postgresql
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Karen Tracey)

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

Change History (3)

comment:1 by Karen Tracey, 15 years ago

Description: modified (diff)

Reformatted description. Please use preview and appropriate WikiFormatting.

comment:2 by Karen Tracey, 15 years ago

Looks to me like the problem was introduced in r12352, not r12098.

comment:3 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: newclosed

(In [12359]) Fixed #12732 -- Corrected an argument naming problem introduced by r12532. Thanks to stevedegrace for the report.

Note: See TracTickets for help on using tickets.
Back to Top