Hi,
I have a problem with LabelImg running on Ubuntu 18.04.2 running on a Virtual Machine on my Macbook with 10.14.3.
When I open a Directory with "Open Dir", where I already started to label (classes.txt and some txt files are already available), I get the following error message in the terminal:
IndexError: list index out of range

But sometimes labelImg opens the existing classes and labels and when I try to add an additional label to the picture, I cannot save it. When I click on save, nothing happens. When I click on next picture, I get the message, whether I like to continue without saving. If I click on "yes", the class.txt file becomes empty and the information in the label txt file got also deleted.
Anybody experienced the same issue?
What should I do or how do I correctly open a folder to continue labeling or to add/edit labels.
你可以在文件夹中可以找到一个class文件,文件保存了/labelimg/data/predefined_classes.txt中定义的标签。
如果你在打标签的时候,添加了class文件之外的新标签就会产生IndexError: list index out of range
。
解决方法就是修改你的class文件,补充上新增的标签。
The english translation(google translate) or YujieShui's comment is:
You can find a class file in the folder that holds the tags defined in /labelimg/data/predefined_classes.txt.
If you add a new tag outside the class file when you are tagging, it will produce IndexError: list index out of range .
The solution is to modify your class file and add the new tags.
I fixed this changing filedir = filePath.split(basename)[0].split("/")[-2:-1][0] with filedir = filePath.split(basename)[0] in labelimg.py , line 1114.
Most helpful comment
The english translation(google translate) or YujieShui's comment is:
You can find a class file in the folder that holds the tags defined in /labelimg/data/predefined_classes.txt.
If you add a new tag outside the class file when you are tagging, it will produce IndexError: list index out of range .
The solution is to modify your class file and add the new tags.