Skip to content

Commit

Permalink
fix ResourceNotFound error (#45)
Browse files Browse the repository at this point in the history
* fix ResourceNotFound error

* add exception
  • Loading branch information
patrick-troy authored Oct 4, 2024
1 parent 603c4a9 commit 8b9b834
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions liiatools/ssda903_pipeline/sufficiency_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
import chardet
from fs.base import FS
from fs.errors import DirectoryExists
from typing import Union

logger = logging.getLogger()
Expand Down Expand Up @@ -655,6 +656,10 @@ def postcode_transform(df: pd.DataFrame) -> pd.DataFrame:

def ofsted_transform(fs: FS, ONSArea: pd.DataFrame) -> (pd.DataFrame, pd.DataFrame):
"""Creates a dimension table with all Ofsted providers and a fact table with all Ofsted inspections"""
try:
fs.makedir("Ofsted")
except DirectoryExists:
pass
fs_ofs = fs.opendir("Ofsted")

# Find the number of years' data present in the folder
Expand Down

0 comments on commit 8b9b834

Please sign in to comment.