This is the error I keep getting
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
This is what the json data looks like:
{
"TITLE": "Rome: The Punic Wars - The First Punic War - Extra History - #1",
"CHANNEL_NAME": "Extra Credits",
"NUMBER_OF_VIEWS": "3,954,083 views",
"LIKES": "50,431",
"DISLIKES": "887",
"NUMBER_OF_SUBSCRIPTIONS": "2.37M",
"HASH_TAGS": []
}
I've tried to modify the file to point of deleting all but the curly brackets, then even them to, but the error still happens.
This is what my code looks like:
import json
with open('C:/Users/longv/Desktop/data.json') as f:
print('hello')
data = json.load(f)
I also searched StackOverflow, but the discussions are so over my head I don't even understand, and it doesn't look like it'd work in my case anyway.
EDIT: This is a load of BS, because I used the online platform repl.it and this code worked fine.
json.loads()?