This is my JSON file:
{
"pass": "test",
"users": "joel"
}
And this is my Python code:
with open("auth.json", "r") as f:
data = json.load(f)
This is error I am getting:
Traceback (most recent call last): File "W:/ComputerScienceDiceGame/dice.py", line 21, in data = json.load(f.read()) File "C:\Python33\lib\json__init__.py", line 268, in load return loads(fp.read(), AttributeError: 'str' object has no attribute 'read'
I know this is probably easy but I can't find the root cause of the issue.