Error in python


I tell them that I was carrying out a training labeling of 1000 objects with the data capture control of the jetson nano.

After that, I tried to do the training and I got the following error:

From what I can see in the image indicated in the error I did not put any label and this is causing the error.

I am concerned because the labeling job was very long with respect to time.

I hope you can help me.


A. Garcés

Hi, apply supervised learning.
So you will need a dataset containing input-output pairs.

Below is a tutorial of collecting database for your reference:



I tell you that with the method that I used in a previous training if it worked.

In the final labeling it seems that I made a mistake by not placing a label on an image, according to the error that the terminal shows, do you think the existing database can be corrected?

Hi @agarcesc7, I believe you should be able to work around the issues with the dataset by modifying the code in

Try wrapping the calls to ET.parse(annotation_file).findall("object") in try/except blocks and handle the case when there are 0 annotations in the file.

Hi Dusty,

Would any of these 2 options apply to correct the warning?

Hi @agarcesc7, I would leave the #1 code block unmodified (as it was before), because if the image doesn’t have any annotations then should be skipped.

#2 looks okay, except set objects = [] in the except clause. Also I believe there is a second occurrence of ET.parse(annotation_file).findall("object") in to handle.

Thanks a lot Dusty, it worked.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.