List index out of bounds (-1) error

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

DFH
Posts: 644
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

List index out of bounds (-1) error

Postby DFH » Mon Jun 24, 2013 5:20 pm

This error occurs when a line to be processed does not end with the specified delimiter,
and when the filter is Move fields: #-delimited field END-1..END-0 move to 1

The error is a show-stopper, as it interrupts the processing of the rest of the input file.

In the attached filter, suitable lines are in the trial run area.

I have included examples with both # and comma as delimiters, with lines both with & without the final delimiter.

It matters not what kind of delimiter is specified,
apart from the fact that this can influence how many lines are processed (if any).
Attachments
Move delimited field from END.zip
Simple filter to process the trial run data
(671 Bytes) Downloaded 359 times

DFH
Posts: 644
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: List index out of bounds (-1) error

Postby DFH » Mon Jun 24, 2013 5:23 pm

The error occurs only when Move fields is the filter type.

When one is copying a field [say] to the end of a line, there is no such error,
even when the line does not terminate with the specified delimiter.

DFH
Posts: 644
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: List index out of bounds (-1) error

Postby DFH » Tue Jun 25, 2013 12:22 am

Meanwhile, an obvious workaround to avoid this critical error is to add a right margin to the lines to be processed.

The right margin should just contain the specified field delimiter.

This can be readily removed after the lines have been processed.

User avatar
DataMystic Support
Site Admin
Posts: 2154
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: List index out of bounds (-1) error

Postby DataMystic Support » Fri Jun 28, 2013 12:46 pm

Thanks David,

Fixed ready for v9.5 today or Monday.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

DFH
Posts: 644
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: List index out of bounds (-1) error

Postby DFH » Thu Jul 04, 2013 6:21 pm

Thanks. Just installed v9.5

David

DFH
Posts: 644
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: List index out of bounds (-1) error

Postby DFH » Sat Jul 06, 2013 12:45 am

Simon,

Thanks. The list index error issue has been fixed, but .....

Now that I've updated to version 9.5, I decided to test the same trial run filter.

On line 3, two fields are moved from the end, even though only one field should have been.
Screenshot_Trial_Run_Test.png
Trial run test for delimiter #


Likewise, if you use comma as the delimiter, the same kind of bug occurs for the last line.

This is now a critical issue, because it will alter the behaviour of existing filters that move fields from the end.

David

User avatar
DataMystic Support
Site Admin
Posts: 2154
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: List index out of bounds (-1) error

Postby DataMystic Support » Mon Jul 15, 2013 3:24 pm

END-1 .. END-0 actually specifies two fields, not one.

Having a trailing delimiter on a line is actually an empty field.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

DFH
Posts: 644
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: List index out of bounds (-1) error

Postby DFH » Mon Jul 15, 2013 5:22 pm

The question is more to do with backwards compatibility.

Please check whether before the out of bounds error was fixed, if moving END-1 ... END-0 used to move two fields or only one.

If the programming error also caused only one field to be moved before, then users need to be alerted.


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 2 guests