Spaces:
Runtime error
Runtime error
File size: 378 Bytes
255c53e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import os
import json
JSON_FILE = "articles.json"
print("WORKDIR:", os.getcwd())
print("Files:", os.listdir("."))
print("Exists articles.json?", os.path.exists(JSON_FILE))
try:
with open(JSON_FILE, "r", encoding="utf-8") as f:
data = json.load(f)
print("JSON loaded successfully, items:", len(data))
except Exception as e:
print("Error loading JSON:", e)
|