| KeyError | Python 2.4.3: /usr/bin/python Sat May 18 21:09:13 2013 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
| /home/performa/public_html/cgi-bin/pfi_upcoming.py |
| 325 |
| 326 |
| 327 |
| 328 if __name__ == '__main__': |
| 329 main() |
| main = <function main> |
| /home/performa/public_html/cgi-bin/pfi_upcoming.py in main() |
| 22 body = all_courses(db) |
| 23 else: |
| 24 body = one_course(db, int(course_id), int(level_id)) |
| 25 |
| 26 db.close() |
| body undefined, global one_course = <function one_course>, db = <_mysql.connection open to 'localhost' at 2687bf0>, builtin int = <type 'int'>, course_id = '453', level_id = '2' |
| /home/performa/public_html/cgi-bin/pfi_upcoming.py in one_course(db=<_mysql.connection open to 'localhost' at 2687bf0>, course_id=453, level_id=2) |
| 139 |
| 140 # Write it up in a webpage |
| 141 if course_dict['variant']: |
| 142 variant = ' (%s)' % course_dict['variant'] |
| 143 else: |
| course_dict = {'capacity': 10L, 'city': 'Tampa', 'country': 'with PFI', 'currency': 'USD', 'date': 'October 27 - 30, 2012', 'end_date': datetime.date(2012, 10, 30), 'id': 453, 'is_full': 'N', 'level': 'Freediver', 'level_page': '/course-information/basic/', ...} |
KeyError: 'variant'
args =
('variant',)