Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. file = bz2.BZ2File(filepath, 'rb')
  2.    
  3. for content in file:
  4.     data = content.decode('utf-8')
  5.     data = json.loads(data)
  6.  
  7. Error:
  8. JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  9.  
  10. I believe because the data read has filename, something, and author name appended in front of it. E.G.
  11. southwestall201610.json0000664000175300017535621120435713153521447016434 0ustar  someonesname{"favorite_count": 0, "place": {"url": "https://api.twitter.com/1.1/geo/id/06168d1feda43857.json",........"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement