0
Ich versuche, eine JSON-Datei von Tweets zu lesen, aber ich erhalte diesen FehlerPython json.loads zeigt Valueerror: Erwartung, Trennzeichen: Linie 1
Valueerror: Erwartung, Trennzeichen: Zeile 1 Spalte 537 (char 536)
Code:
import json
import pandas as pd
import matplotlib.pyplot as plt
import json
with open('/Users/Mustafa/desktop/tweets.json', 'r') as f:
line = f.readline() # read only the first tweet/line
tweet = json.loads(line) # load it as Python dict
print(json.dumps(tweet, indent=4)) # pretty-print
eine Idee, wie ich das beheben kann oder was mache ich falsch?