Opened 17 years ago

Last modified 13 years ago

#7302 closed

Bug in the query statement — at Initial Version

Reported by: ygpark2@… Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords: sqlite, db, wrapper 1.0-blocker
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Lately, I got this error

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/pages/
Django Version: 0.97-pre-SVN-7548
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',

'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
'pages',
'hierarchical']

Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',

'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware')

Traceback:
File "/Users/ygpark/lib/django_trunk/django/core/handlers/base.py" in get_response

  1. response = callback(request, *callback_args, callback_kwargs)

File "/Users/ygpark/lib/django-page-cms/utils.py" in _dec

  1. response = func(request, *args, kwargs)

File "/Users/ygpark/lib/django-page-cms/pages/views.py" in details

  1. pages = HierarchicalNode.get_first_level_objects(Page)

File "/Users/ygpark/lib/django-page-cms/hierarchical/models.py" in get_first_level_objects

  1. return [obj.object for obj in objs]

File "/Users/ygpark/lib/django_trunk/django/db/models/query.py" in _result_iter

  1. self._fill_cache()

File "/Users/ygpark/lib/django_trunk/django/db/models/query.py" in _fill_cache

  1. self._result_cache.append(self._iter.next())

File "/Users/ygpark/lib/django_trunk/django/db/models/query.py" in iterator

  1. for row in self.query.results_iter():

File "/Users/ygpark/lib/django_trunk/django/db/models/sql/query.py" in results_iter

  1. for rows in self.execute_sql(MULTI):

File "/Users/ygpark/lib/django_trunk/django/db/models/sql/query.py" in execute_sql

  1. cursor.execute(sql, params)

File "/Users/ygpark/lib/django_trunk/django/db/backends/util.py" in execute

  1. return self.cursor.execute(sql, params)

File "/Users/ygpark/lib/django_trunk/django/db/backends/sqlite3/base.py" in execute

  1. return Database.Cursor.execute(self, query, params)

Exception Type: OperationalError at /pages/
Exception Value: near "order": syntax error

I think this kind of sql syntax error is caused in the django framework.

So can you check whether this is bug or not?

Change History (0)

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