'Type error for tfrecord when training my Dl model

I am trying to create the train records for training my dl and I am using the following commands to change the XML annotation files and images to the train file

!py generate_tfrecord.py -x C:/Users/Desktop/dataset/Workspace/images/train -l C:/Users/Desktop/dataset/Workspace/annotations/Annotations/Train/train.record

And this one as well and I am confused about the difference between these commands

!py generate_tfrecord.py -x C:/Users/Desktop/dataset/Workspace/images/train -l C:/Users/Desktop/dataset/Workspace/annotations/Annotations/labelmap.pbtxt  -o C:/Users/Desktop/dataset/Workspace/annotations/Annotations/Train/train.record

I am trying this code and I a getting the following error. any help?

TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
        1. tensorflow.python.lib.io._pywrap_file_io.BufferedInputStream(filename: str, buffer_size: int, token: tensorflow.python.lib.io._pywrap_file_io.TransactionToken = None). 

This keeps popping even though, I changed it to the following

label_map_dict = label_map_util.get_label_map_dict(label_map) 

I replaced it to the following

label_map_dict = label_map_util.get_label_map_dict(args.label_map)

and commented out this line of code any help

#label_map = label_map_util.load_labelmap(args.labels_path)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source