hmarr/mongoengine — Issue #336: slice: IndexError: stop index must be greater than startindex for slice 
Author: kittle
Created: 2011-10-27 11:48:01+00:00
State: open

>>> len(models.SpeechAct.objects)
259

>>> models.SpeechAct.objects[0]

>>> models.SpeechAct.objects[10:11]
[]

>>> models.SpeechAct.objects[100:101]
Traceback (most recent call last):
File "", line 1, in
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mongoengine/queryset.py", line 1615, in __repr__
data = list(self[self._skip:limit])
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mongoengine/queryset.py", line 1028, in __getitem__
raise err
IndexError: stop index must be greater than startindex for slice slice(100, 21, None)