The Train status API I use recently added two additional key value pairs (has_arrived, has_departed) in the JSON object, which caused my script to crash.
(has_arrived, has_departed)
Instead of doing eval on the answer, use the json module.
eval