From 228064f57a72b5dfbf3039cc040c6e4acf730653 Mon Sep 17 00:00:00 2001 From: Daniel Guerrero Date: Sun, 20 Oct 2024 18:17:53 +0200 Subject: [PATCH] fix: closes #938 (#947) --- sepal_ui/sepalwidgets/inputs.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sepal_ui/sepalwidgets/inputs.py b/sepal_ui/sepalwidgets/inputs.py index 2fba53e4..5d45bdc0 100644 --- a/sepal_ui/sepalwidgets/inputs.py +++ b/sepal_ui/sepalwidgets/inputs.py @@ -403,7 +403,14 @@ def _get_items(self) -> List[v.ListItem]: list_dir = [el for el in folder.glob("*") if not el.name.startswith(".")] if self.extensions: - list_dir = [el for el in list_dir if el.is_dir() or el.suffix in self.extensions] + valid_list_dir = [] + for el in list_dir: + try: + if el.is_dir() or el.suffix in self.extensions: + valid_list_dir.append(el) + except Exception: + continue + list_dir = valid_list_dir if folder in self.cache_dirs: if self.cache_dirs[folder]["files"] == list_dir: