Index error while trying to read JSON file

Just in case anyone else bumps into this problem, I got an index error while trying to read my stories.json file. The problem was with this line:

file.open(filename, File.Read)

Any of the following worked for me:

file.open(filename, file.READ)
file.open(filename, File.READ)
file.open(filename, 1)

1 Like

Privacy & Terms