veeara282 / instant-press

Open source CMS for the Web2Py framework
GNU General Public License v2.0
4 stars 4 forks source link

Limit by on GAE #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Problem on GAE

#
E 08-13 11:15AM 28.221

In FILE: 
/base/data/home/apps/rochacbruno/1.344059879837984861/applications/init/views/de
fault/index.html

Traceback (most recent call last):
  File "/base/data/home/apps/rochacbruno/1.344059879837984861/gluon/restricted.py", line 186, in restricted

    exec ccode in environment
  File "/base/data/home/apps/rochacbruno/1.344059879837984861/applications/init/views/default/index.html", line 266, in <module>
  File "/base/data/home/apps/rochacbruno/1.344059879837984861/applications/init/models/widgets.py", line 12, in widgets_get_menu

    (pages, pages_count) = get_last_pages(1)
  File "/base/data/home/apps/rochacbruno/1.344059879837984861/applications/init/models/main.py", line 213, in get_last_pages
    last_posts = db(query).select(db.posts.ALL,orderby=~db.posts.published_on,limitby=(limit_inf, limit_sup))

  File "/base/data/home/apps/rochacbruno/1.344059879837984861/gluon/contrib/gql.py", line 731, in select
    (items, tablename, fields) = self._select(*fields, **attributes)
  File "/base/data/home/apps/rochacbruno/1.344059879837984861/gluon/contrib/gql.py", line 720, in _select

    items = items.fetch(limit, offset=offset)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1849, in fetch
    raw = raw_query.Get(limit, offset, rpc=rpc)

  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 1253, in Get
    limit=limit, offset=offset, prefetch_count=limit, **kwargs)._Get(limit)
  File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 1188, in _Run

    str(exc) + '\nThis query needs this index:\n' + yaml)
NeedIndexError: no matching index found.
This query needs this index:
- kind: posts
  properties:
  - name: is_page
  - name: published

  - name: published_on
    direction: desc

Original issue reported on code.google.com by rochacbruno on 13 Aug 2010 at 6:25

GoogleCodeExporter commented 9 years ago
you have the lastest version of appengine and web2py?

http://googleappengine.googlecode.com/files/google_appengine_1.3.5.zip

Mine is working ok in http://instant2press.appspot.com/instantpress/

Original comment by mulone.m...@gmail.com on 13 Aug 2010 at 7:10

GoogleCodeExporter commented 9 years ago

Original comment by mulone.m...@gmail.com on 20 Oct 2010 at 2:20