Dec-22-2021, 05:08 PM
Please show all the code as well.
The post you are replying to has the initial open specified as:
The post you are replying to has the initial open specified as:
with open('testjson_dict.json') as ifh:which uses the default open mode of "read". Your error message suggests that you are using a mode "w" (or "a"). You've opened the file for writing only and have asked the json method to read from it.