| KeyError | Python 2.4.3: /usr/bin/python Fri May 24 16:12:39 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 23c5430>, builtin int = <type 'int'>, course_id = '509', level_id = '3' |
| /home/performa/public_html/cgi-bin/pfi_upcoming.py in one_course(db=<_mysql.connection open to 'localhost' at 23c5430>, course_id=509, level_id=3) |
| 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': 'USA', 'currency': 'USD', 'date': 'April 13 - 14, 2013', 'end_date': datetime.date(2013, 4, 14), 'id': 509, 'is_full': 'N', 'level': 'Intermediate Freediver', 'level_page': '/course-information/intermediate/', ...} |
KeyError: 'variant'
args =
('variant',)