fix python keyerror (use dict.get(key))
fix image saved path
fix key undefined