Okay, I have been handed a python project and working through it I have had to add a report. I am returning 10 variables the results of an SQL Query and as usual the number of results vary from 1 result to 10 results so I implemented a check to see if the array item was empty or not. The code
is below based upon the code already in the python project i was handed. history8=historyRep[8] if history8!=None: history8=cmi.format_history(historyRep[8]) else: history8='' and if historyRep[8]!=None: history8=cmi.format_history(historyRep[8]) else: history8='' but regardless i am getting the error below and i can't seen to resolve this, what am i doing wrong? Traceback (most recent call last): File "/home/phillipsd/work/medusa-new/htdocs/pricingrep.cgi", line 326, in ? if historyRep[8]==None: IndexError: list index out of range David P -- http://mail.python.org/mailman/listinfo/python-list