fix file_path #45

Merged
sgode merged 1 commits from fix_file_path into main 2025-08-13 13:15:38 +00:00

View File

@ -14,7 +14,8 @@
from pathlib import Path
import json
analytics_path = Path("otc_metadata/analytics/public")
BASE_DIR = Path(__file__).resolve().parent
analytics_path = BASE_DIR / "public"
cloud_environments = [
'eu_de',
@ -24,8 +25,8 @@ analytics_data = {k: [] for k in cloud_environments}
# Open and read the json data files
for env in cloud_environments:
file_path = analytics_path.joinpath(f"{env}.json")
with open(file_path, 'r') as file:
file_path = analytics_path / f"{env}.json"
with file_path.open(encoding="utf-8") as file:
analytics_data[env] = json.load(file)