I don't know what the error message exactly means, however i found a solution by accident. I think createML expects us to give a directory (training, validation or testing) that contains a subdirectory for each class which has the textual data in it. So, for a binary sentiment analysis problem, "train" directory should have 2 sub directories called "neg" and "pos". "neg" directory has files of examples that have negative sentiment. Likewise, "pos" directory has files of examples that have positive sentiment.
Hope this helps.