Closed Cogitarian closed 4 years ago
I cannot open your screenshot (I have to login), can you copy paste the errors in the issue?
Sure, I'd happy to:
eafexp1.copy_tier(eafexp1,"lh_Activation_R2")
Traceback (most recent call last):
File "", line 1, in
Are you sure there is a tier with that exact name in the original object? Can you maybe attach the elan file and the script as well.
Right, it works between different files, but not within one file, perhaps because elan does not accept two tiers with the same name. I guess the solution would be to copy the tier a temporary file and after changing its name copy it again into original file. I'll try that later. Any other solutions?
OK, here is new function to duplicate tiers within the same eaf file. Unfortunately the result is a tier with duplicated annotations and I have no idea why this happens, as you can't do that in elan manually. I'm sure there is a bug in my function or there is room for improvement. Any ideas?
Here are two files: temporary.eaf is a file with just one empty tier and it is used to make a temporary copy of a tier from the annotated.eaf. The new file is here. I hope you can run the code to reproduce the bug seen on this screenshot.
OK, I've solved it with another elan object. The function doesn't look pretty but it works for me.
Good to hear that the problem is solved. Small note, initializing an EAF object without filename is fine as well. This will just create an empty EAF file.
OK, here is new function to duplicate tiers within the same eaf file. Unfortunately the result is a tier with duplicated annotations and I have no idea why this happens, as you can't do that in elan manually. I'm sure there is a bug in my function or there is room for improvement. Any ideas?
Here are two files: temporary.eaf is a file with just one empty tier and it is used to make a temporary copy of a tier from the annotated.eaf. The new file is here. I hope you can run the code to reproduce the bug seen on this screenshot.
The URL was not found. I get stuck with duplicate tiers within the same eaf file. Thank you!
Expected behaviour I need to copy (duplicate) tier in one file or from one file to another and I don't understand the syntax: how copy function is supposed to work?
Actual behaviour I'd like to copy tier and change its name within one file. Next, I'd like to loop it over tens of other ear files. I thought copy_tier would work, but it doesn't. I've tried to copy tier from one object to another, but then got errors (see screenshot).
System information
Additional context Add any other context about the problem here.