some one please help me regarding why the index error is occuring... i find the application works fine for a few values of textidx but only for a few distinct values this error occurs.... kindly help me Traceback (innermost last): - Module ZPublisher.Publish, line 119, in publish - Module ZPublisher.mapply, line 88, in mapply - Module ZPublisher.Publish, line 42, in call_object - Module Shared.DC.Scripts.Bindings, line 313, in __call__ - Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec - Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec - Module Products.PageTemplates.ZopePageTemplate, line 426, in pt_render - Module Products.PageTemplates.PageTemplate, line 89, in pt_render - Module zope.pagetemplate.pagetemplate, line 117, in pt_render - Module zope.tal.talinterpreter, line 271, in __call__ - Module zope.tal.talinterpreter, line 346, in interpret - Module zope.tal.talinterpreter, line 824, in do_loop_tal - Module zope.tal.talinterpreter, line 346, in interpret - Module zope.tal.talinterpreter, line 536, in do_optTag_tal - Module zope.tal.talinterpreter, line 521, in do_optTag - Module zope.tal.talinterpreter, line 516, in no_tag - Module zope.tal.talinterpreter, line 346, in interpret - Module zope.tal.talinterpreter, line 590, in do_setGlobal_tal - Module zope.tales.tales, line 696, in evaluate *URL: /news/SearchReport* *Line 79, Column 2* *Expression: <PythonExpr container.data.restrictedTraverse(storynb[0]).getChapterInfo(storynb[1], kfMax)>* *Names:* {'container': <Folder at /news>, 'context': <Folder at /news>, 'default': <object object at 0xb7d62528>, 'here': <Folder at /news>, 'loop': {u'result': <Products.PageTemplates.Expressions.PathIterator object at 0x1993cfcc>}, 'nothing': None, 'options': {'args': ()}, 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x186ab80c>, 'request': <HTTPRequest, URL=http://kmi-vid01.open.ac.uk:8080/news/SearchReport>, 'root': <Application at >, 'template': <ZopePageTemplate at /news/SearchReport>, 'traverse_subpath': [], 'user': <User 'mmis'>} - Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__ __traceback_info__: container.data.restrictedTraverse(storynb[0]).getChapterInfo(storynb[1], kfMax) - Module PythonExpr, line 1, in <expression> - Module Shared.DC.Scripts.Bindings, line 313, in __call__ - Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec - Module Products.PythonScripts.PythonScript, line 327, in _exec - Module None, line 26, in getChapterInfo *<PythonScript at /news/getChapterInfo used for /news/data/20071124>* *Line 26* - Module AccessControl.ZopeGuards, line 67, in guarded_getitem IndexError: list index out of range
--On 4. Juni 2008 12:41:01 +0100 suhail shaik <suhailsqm@gmail.com> wrote:
some one please help me regarding why the index error is occuring... i find the application works fine for a few values of textidx but only for a few distinct values this error occurs....
This error caused in your code. So you have to provide the code in order to get help. Andreas
suhail shaik wrote at 2008-6-4 12:41 +0100:
... Traceback (innermost last):
.... - Module zope.tal.talinterpreter, line 346, in interpret - Module zope.tal.talinterpreter, line 590, in do_setGlobal_tal - Module zope.tales.tales, line 696, in evaluate *URL: /news/SearchReport* *Line 79, Column 2* *Expression: <PythonExpr container.data.restrictedTraverse(storynb[0]).getChapterInfo(storynb[1], kfMax)>* ... - Module Products.PythonScripts.PythonScript, line 327, in _exec - Module None, line 26, in getChapterInfo *<PythonScript at /news/getChapterInfo used for /news/data/20071124>* *Line 26* - Module AccessControl.ZopeGuards, line 67, in guarded_getitem
IndexError: list index out of range
Near line 26 of your PythonScript "getChapterInfo" you access a sequence with a too large index. Probably, your sequence depends on some search (or is otherwise dynamically) and has fewer elements then expected. -- Dieter
participants (3)
-
Andreas Jung -
Dieter Maurer -
suhail shaik