nltk_contrib icon indicating copy to clipboard operation
nltk_contrib copied to clipboard

Found a bug in textgrid.py

Open turbo-wang opened this issue 9 years ago • 0 comments

Hello,

I found a bug in function "to_oo()" in textgrid.py.

def to_oo(self): """ @return: A string in OoTextGrid file format. """

    oo_file = ""
    oo_file += "File type = \"ooTextFile\"\n"
    oo_file += "Object class = \"TextGrid\"\n\n"
    oo_file += "xmin = ", self.xmin, "\n"
    oo_file += "xmax = ", self.xmax, "\n"
    oo_file += "tiers? <exists>\n"
    oo_file += "size = ", self.size, "\n"
    oo_file += "item []:\n"

TypeError: cannot concatenate 'str' and 'tuple' objects

May it been written as oo_file += "xmin = "+self.xmin+"\n" and so on.

turbo-wang avatar Dec 28 '16 08:12 turbo-wang