List index out of bounds (-1) error
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
-
- Posts: 988
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
List index out of bounds (-1) error
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).
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 702 times
David
-
- Posts: 988
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Re: List index out of bounds (-1) error
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.
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.
David
-
- Posts: 988
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Re: List index out of bounds (-1) error
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.
The right margin should just contain the specified field delimiter.
This can be readily removed after the lines have been processed.
David
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: List index out of bounds (-1) error
Thanks David,
Fixed ready for v9.5 today or Monday.
Fixed ready for v9.5 today or Monday.
-
- Posts: 988
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
-
- Posts: 988
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Re: List index out of bounds (-1) error
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. 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
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. 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
David
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: List index out of bounds (-1) error
END-1 .. END-0 actually specifies two fields, not one.
Having a trailing delimiter on a line is actually an empty field.
Having a trailing delimiter on a line is actually an empty field.
-
- Posts: 988
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Re: List index out of bounds (-1) error
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.
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.
David