Textcat.manual error when entering many labels

When I try to annotate with textcat.manual using 33 labels I get the following error message: "OSError: [Errno 63] File name too long: 'Irrelevant,Innovation,Market Trends, ... " The "File name" is a list of the labels. It does work if I use less labels. See screenshot for the complete error message. Any ideas on how I can solve this? Thanks!

Are you sure that the problem is not in the syntax? all the comma-separated labels are usually formatted as a single string

--labels "LABEL1,LABEL2,LABEL3"

I think the problem here is that the command line argument is set up to accept either a list of labels, or a file path to a .txt file. It then checks if the label is a file, which is typically not an issue, because it takes a lot of labels for the string to be too long. But this is what happened here.

If you really have this many labels, it's better to just put them in a .txt (one label per line) file and pass in the filepath instead.

Hi Ines, You are right. Reading in the labels from a .txt file solves the problem. Thanks!

1 Like