Error trying to open JSON tweet file
Question: I'm getting the following error when attempting to open a json file.

    
    
    Traceback (most recent call last):
    File "C:\Python34\test.py", line 5, in <module>
    data = json.load(data_file)
    File "C:\Python34\lib\json\__init__.py", line 268, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
    File "C:\Python34\lib\json\__init__.py", line 318, in loads
    return _default_decoder.decode(s)
    File "C:\Python34\lib\json\decoder.py", line 346, in decode
    raise ValueError(errmsg("Extra data", s, end, len(s)))
    ValueError: Extra data: line 2 column 1 - line 8300 column 1 (char 157 - 30292811)
    

This is what I"m doing to open the file in idle:

    
    
    import json
    
    with open('three_minutes_tweets.json','r', encoding="utf-8") as data_file:
    
    data = json.load(data_file)
    
    print(data_file)
    

The file is a tweet sample file and looks likes simple dictionaries of
dictionaries. Thank you


Answer: The error message is telling you exactly what the problem is. There is extra
data starting at character 157. In other words, you have invalid JSON data.
There is nothing wrong with your code.

