I'm trying to read in and parse a json file, I'm not sure why I'm getting this error. I had this working earlier today but after I updated and restarted Spyder it wouldn't work. I've now tried it with vscode as well and am running into the same error.
with open(r"C:\Users\Eric\OneDrive\GUI Proj\NBA_schedule.json") as myfile:
data = myfile.read()
sched_access = data['leagueSchedule']
gameDates = sched_access['gameDates']
I got this json file from this link https://cdn.nba.com/static/json/staticData/scheduleLeagueV2.json and have tried both json.load() and json.loads() as well as not using the with open method. But I am continuing to get errors. What am I missing here?
EDIT: It has to do with one of my imports...somehow