The filter_size property is being set with the value of the desired filter size when it should be getting set with the index of the value in the available filter size array.
When the filter_size is accessed, it throws an error since it again tries to lookup the filter size as if it was set with an index.