--------------------------------------------------------------------------- TypeError Traceback (most recent call last) in () 1 # create training dataset ----> 2 create_tfrecord_dataset(train_images_filename_list, train_writer) in create_tfrecord_dataset(filename_list, writer) 15 continue 16 try: ---> 17 annotation_np = read_annotation_from_mat_file(annotations_dir_aug_voc, image_name) 18 except FileNotFoundError: 19 # read from Pascal VOC path in read_annotation_from_mat_file(annotations_dir, image_name) 1 def read_annotation_from_mat_file(annotations_dir, image_name): 2 annotations_path = os.path.join(annotations_dir, (image_name.strip() + ".mat")) ----> 3 mat = spio.loadmat(annotations_path) 4 img = mat['GTcls']['Segmentation'][0][0] 5 return img ~\Anaconda3\envs\tensorflow\lib\site-packages\scipy\io\matlab\mio.py in loadmat(file_name, mdict, appendmat, **kwargs) 139 """ 140 variable_names = kwargs.pop('variable_names', None) --> 141 MR, file_opened = mat_reader_factory(file_name, appendmat, **kwargs) 142 matfile_dict = MR.get_variables(variable_names) 143 if mdict is not None: ~\Anaconda3\envs\tensorflow\lib\site-packages\scipy\io\matlab\mio.py in mat_reader_factory(file_name, appendmat, **kwargs) 62 63 """ ---> 64 byte_stream, file_opened = _open_file(file_name, appendmat) 65 mjv, mnv = get_matfile_version(byte_stream) 66 if mjv == 0: TypeError: 'NoneType' object is not iterable