ValueError: list.index(x): x not in list
is the standard python exception plus text when looking for an item in a list that does not contain the item. this exception is raised when you attempt accessing a non existing column.
that 'x' does not really help finding what column you were trying to access, what about this:
def indexOfFieldName(self, name):
"""Index of field named ``name``."""
# FIXME: move this to header class
try:
return self.header.fields.index(name)
except ValueError:
raise ValueError("can't find index of field '%s'" % name)