Signbank / Global-signbank

An online sign dictionary and sign database management system for research purposes. Developed originally by Steve Cassidy/ This repo is a fork for the Dutch version, previously called 'NGT-Signbank'.
http://signbank.cls.ru.nl
BSD 3-Clause "New" or "Revised" License
19 stars 12 forks source link

Some annotated videos / annotation files not saved #1370

Open Jetske opened 2 days ago

Jetske commented 2 days ago

See https://signbank.cls.ru.nl/dictionary/gloss/2326 which should have 3 sentences but shows none. The 3 annotatedvideo objects are not there, and the annotation file is also missing.

susanodd commented 1 day ago

If you click on the results in the scroll bar, and then visit the pages, you see that the video format is not supported.

https://signbank.cls.ru.nl/dictionary/annotatedsentence/21

On my browser, it shows the not supported format video image.

susanodd commented 1 day ago

@Jetske I added a model method to get the path for the eaf file in order to display it in the list.

However, it returns the correct path. If you look in the admin for the Annotated Glosses, in the column eaf file, they are all filled in. The ones where the file is missing are sentence 2 and 29. But they have the eaf file inside the objects. This is a bit weird. So the method to retrieve the path is also going to need to check if the path/file exists?

susanodd commented 1 day ago

Here is some code (modified to test for it being empty):

    def get_eaffile_name(self):
        return os.path.basename(self.eaffile.name) if self.eaffile else ""

That is the type-safe way to implement it. But if it's empty, then that is a problem.

This is actually the same as doing

str(self.eaffile)? That should just return the relative path, right?

Is it possible one of the operations ended up erasing the file by accident? The upload has this as a required field.

susanodd commented 17 hours ago

@Jetske I added some Admin to be able to investigate what is stored. #1372

In the Annotated Gloss List (search), the paths only show up in the results list now if the file exists. This is meant to assist administration in identifying when something is missing. We still don't know why the files disappeared.