Skip to content

Commit

Permalink
fixed #18
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammad-fiaz committed Dec 8, 2023
1 parent cf8aa4d commit 4bb1675
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion checkversions/checkversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ def get_default_hierarchy_from_json():
# Initialize DotSetup
ds = DotSetup()

# Get the absolute path to the directory containing this module
json_file_path = os.path.abspath('default_hierarchy.json')


# Load from JSON file
value_json = ds.load('default_hierarchy', file_type='json', file_path='../default_hierarchy.json')
value_json = ds.load('default_hierarchy', file_type='json', file_path=json_file_path)
return value_json
except (FileNotFoundError, VariableNotFoundError, JSONDecodeError) as e:
print(f"Error loading default hierarchy from JSON: {e}")
Expand Down

0 comments on commit 4bb1675

Please sign in to comment.