From bdc2c77b5fa86bb6dbeebdbaf7e0b6db122b6504 Mon Sep 17 00:00:00 2001 From: legout Date: Wed, 4 Dec 2024 17:44:23 +0100 Subject: [PATCH] Handle FileNotFoundError when inferring partitioning in BaseDataset; update version to 0.9.1.5 in pyproject.toml --- pydala/dataset.py | 8 ++++++-- pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pydala/dataset.py b/pydala/dataset.py index a47c3dd..431ead1 100644 --- a/pydala/dataset.py +++ b/pydala/dataset.py @@ -81,8 +81,12 @@ def __init__( # NOTE: Set partitioning manually, if not set, try to infer it if partitioning is None: # try to infer partitioning - if any(["=" in obj for obj in self.fs.ls(self._path)]): - partitioning = "hive" + try: + if any(["=" in obj for obj in self.fs.ls(self._path)]): + partitioning = "hive" + except FileNotFoundError as e: + _ = e + partitioning = None else: if partitioning == "ignore": partitioning = None diff --git a/pyproject.toml b/pyproject.toml index b7f8327..5288c23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ name = "pydala2" readme = "README.md" repository = "https://github.com/legout/pydala2" requires-python = ">= 3.10" -version = "0.9.1.4" +version = "0.9.1.5" [project.optional-dependencies] legacy = ["polars-lts-cpu>=0.20.4"]