Why the index error?

File “/ports/files/table.py”, line 57, in do_filter
File “/ports/files/table.py”, line 25, in tbl_headers
result = s[0][0][‘c’][:]
IndexError: list index out of range

def tbl_headers(s):

    result = s[0][0]['c'][:]
    #This will began to build the columns of the table
    for i in range(1, len(s)):
        result.append(inlatex(r'} & \textbf{'))
   #Close last column before the newline
    result.append(inlatex(r'} \\ \hline'))
    result.insert(0, inlatex(r'\textbf{'))
    return pf.Para(result)

I am using a filter to modify the size of a table that has rows, columns, & etc but can not get pass this error message. Not sure how to fix. (Although the function works when there is only 1 table being modified but if there is 2 or more tables being modified then the error message shows up.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.