Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/etl/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def extract(path: str = "xyz.csv") -> pd.DataFrame :
pass
except UnicodeDecodeError:
print(f"Failed to read with encoding '{encoding}'") # Log the encoding that failed
continue
except Exception as e:
print(f"Error reading with encoding '{encoding}': {e}")
continue

if df is None:
raise ValueError(f"Could not read CSV with tried encodings: {encodings}")
Expand Down
Loading