You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/python3.10/dist-packages/tgt/util.py in concatenate_textgrids(textgrids, ignore_nonmatching_tiers, use_absolute_time)
151 if (not ignore_nonmatching_tiers and
152 not all([len(common_tiers) == len(tg) for tg in textgrids])):
--> 153 raise TextGridToolsException(
154 'Different numbers of tiers or non-matching tier names.')
155 ccd_tiers = {}
TextGridToolsException: Different numbers of tiers or non-matching tier names.
I get the same error even when I concatenate a file with itself:
9 tg = tgt.util.concatenate_textgrids([tg1,tg1])
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. The reason why you are seeing this error is that both of your tiers have the same name (`silences’). If you rename one them, things should work fine.
I wonder if you commonly use textgrids with tiers having the same name? I think it makes sense to expect that this is *not* the case but perhaps we could check for this and add a less mystifying message.
On 4 May 2024, at 09:27, Hossep Dolatian ***@***.***> wrote:
I have two small TextGrids tg1 and tg2. They have the same number of tiers and tier names, but the concatenate code fails and raises an error.
tg1 = tgt.read_textgrid(file1)
tg2 = tgt.read_textgrid(file2)
print(len(tg1.tiers) == len(tg2.tiers))
print(tg1.get_tier_names() == tg2.get_tier_names())
tg = tgt.util.concatenate_textgrids([tg1,tg2])
Result:
/usr/local/lib/python3.10/dist-packages/tgt/util.py in concatenate_textgrids(textgrids, ignore_nonmatching_tiers, use_absolute_time)
151 if (not ignore_nonmatching_tiers and
152 not all([len(common_tiers) == len(tg) for tg in textgrids])):
--> 153 raise TextGridToolsException(
154 'Different numbers of tiers or non-matching tier names.')
155 ccd_tiers = {}
TextGridToolsException: Different numbers of tiers or non-matching tier names.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
I have two small TextGrids tg1 and tg2. They have the same number of tiers and tier names, but the concatenate code fails and raises an error.
Result:
I get the same error even when I concatenate a file with itself:
The text was updated successfully, but these errors were encountered: