I have been using pympi (http://dopefishh.github.io/pympi/Elan.html) to write python code to automatically generate annotation boxes below the transcriptions, and gloss each word using a digital dictionary which we have produced. This worked fine until we started filling in the free translations. After doing this, saving and closing the file, the file will no longer open. Looking at the log and the .eaf in a text editor revealed that both time_slot_ref1 and time_slot_ref2 have been changed to the empty string, for all annotations. I was able to reproduce this problem when I regenerated the glosses and then tried to alter the file in ELAN.
Has anyone experienced this behavior before? I have one theory - the pympi code I wrote may have produced some overlapping annotations on the same tier. Could this be the source of the problem? If this matters, I’m on the ubuntu version.
Just to be sure, the free translations are filled in in ELAN? So it is possible to open the file in ELAN after the update by the Python script, but after editing in ELAN the file is damaged?
If that is the case it might be good to have a look in the log (View->View Log…) after opening the updated file in ELAN, maybe there are error messages there.
Otherwise the only way to say anything about this is probably to have a look at the eaf before and after the update by the Python script.
I am running into the same problem. After running the python code, I am able to open de .eaf files and edit them. However, after I save the files, I am not able to open them anymore. It appears that the time_slot_ref1 and ref2 have been changed to empty strings.
The log of the update eaf file indeed gives some error messages:
Error: cvc-attribute.3: The value ‘’ of attribute ‘TIME_SLOT_REF1’ on element ‘ALIGNABLE_ANNOTATION’ is not valid with respect to its type, ‘IDREF’.
Error: cvc-datatype-valid.1.2.1: ‘’ is not a valid value for ‘NCName’.
Error: cvc-attribute.3: The value ‘’ of attribute ‘TIME_SLOT_REF2’ on element ‘ALIGNABLE_ANNOTATION’ is not valid with respect to its type, ‘IDREF’.
After running the Python code and before opening and editing the result in ELAN, can you try the File->Validate EAF file… function of ELAN on the generated eaf file? To see if there are errors or inconsistencies in the file?
The errors indicate that annotations on one-to-one related depending tiers (i.e. of type "Symbolic Association) contain alignable annotations (should be reference annotations, “REF_ANNOTATION” in the eaf).
Did you use pympi to create the (depending) tiers as well as the annotations or only to generate the annotations? Maybe you used wrong arguments when running the code to generate the tiers and/or the annotations? (I’m not too familiar with the options for pympi).
I think I just managed to solve the problem. In the original python code I added annotations to a child tier using the add_annotation function instead of using the add_ref_annotation function. I changed the code and now it works. The error messages are gone and I am able to edit and save the file and open it in ELAN afterwards.