hi Tom,
this is an issue with the grammar of that xml file.
I am not sure about what problem this is.
if I understand you right this failed once, and after that it did not fail any more? or is this reproducable?
kind regards,
henk-jan
On 06/16/2016 07:11 PM, Tom Westrick wrote:
> Can anyone point me in the right direction in fixing "IndexError: list index out of range"? Bots is failing on an XML file the first time it reads it in. If I re-process it, it runs fine which is
> why I am not sure what is wrong. It is also successful if I re-queue the original file.
>
> Here is the full stacktrace:
> |
> Traceback(most recent call last):
> File"c:\python27\lib\site-packages\bots\transform.py",line 71,in_translate_one_file
> edifile.checkforerrorlist()#no exception if infile has been lexed and parsed OK else raises an error
> File"c:\python27\lib\site-packages\bots\message.py",line 40,incheckforerrorlist
> raisebotslib.MessageError(u''.join(self.errorlist))
> MessageError:Traceback(most recent call last):
> File"c:\python27\lib\site-packages\bots\inmessage.py",line 47,inparse_edi_file
> ediobject.initfromfile()
> File"c:\python27\lib\site-packages\bots\inmessage.py",line 1408,ininitfromfile
> self.checkmessage(self.root,self.defmessage)
> File"c:\python27\lib\site-packages\bots\message.py",line 98,incheckmessage
> self._checkonemessage(node_instance,defmessage,subtranslation)
> File"c:\python27\lib\site-packages\bots\message.py",line 108,in_checkonemessage
> self._checkifrecordsingrammar(node_instance,structure[0],defmessage.grammarname)
> File"c:\python27\lib\site-packages\bots\message.py",line 118,in_checkifrecordsingrammar
> self._checkiffieldsingrammar(node_instance,structure)#check if fields are known in grammar
> File"c:\python27\lib\site-packages\bots\message.py",line 151,in_checkiffieldsingrammar
> iffield_definition[ISFIELD]:#if field (no composite)
> IndexError:list index outof range
> |
>
> <
https://lh3.googleusercontent.com/-C3PsV-OygJk/V2Lda575jKI/AAAAAAAAEB4/O38iBDxkSq0ldZADKrsuu8wQCnsMZICFACLcB/s1600/bots_fail.PNG>
>
> <
https://lh3.googleusercontent.com/-j60I2yTBu_M/V2LdhcEVA0I/AAAAAAAAECA/KYII_UUtbJw5GUI9K5-_EcNIu6RAhrKoACLcB/s1600/bots_success.PNG>
>
> -Tom
> --
> You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
botsmail+u...@googlegroups.com <mailto:
botsmail+u...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.