diff --git a/sleap/gui/dataviews.py b/sleap/gui/dataviews.py index bd99d1ecf..721bdc321 100644 --- a/sleap/gui/dataviews.py +++ b/sleap/gui/dataviews.py @@ -396,11 +396,9 @@ def item_to_data(self, obj, item: "Video"): data = {} for property in self.properties: if property == "name": - filename = getattr(item, "filename") - data[property] = Path(filename).name + data[property] = Path(item.filename).name elif property == "filepath": - filename = getattr(item, "filename") - data[property] = str(Path(filename).parent) + data[property] = str(Path(item.filename).parent) else: data[property] = getattr(item, property) return data