json.decoder.JSONDecodeError: Extra data: line 1 column 12 (char 11)
See original GitHub issueTraceback (most recent call last):
File "/usr/local/bin/delete-tweets", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/deletetweets/__main__.py", line 53, in main
deletetweets.delete(args.file, args.date, filters, args.spare_ids, args.min_likes, args.min_retweets, args.dry_run)
File "/usr/local/lib/python3.7/dist-packages/deletetweets/deletetweets.py", line 72, in delete
tweets = json.loads(tweetjs_file.read()[25:])
File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 12 (char 11)
Json that is being used https://sfo2.digitaloceanspaces.com/mbcdn/psty/d3a_tweet-part2.js
Not why I’m getting the error that’s being shown above?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
json.decoder.JSONDecodeError: Extra data: line 2 column 1 ...
You have two records in your json file, and json.loads() is not able to decode more than one. You need to do it...
Read more >json.decoder.JSONDecodeError: Extra data in Python
The Python "json.decoder.JSONDecodeError: Extra data" occurs when we try to parse multiple objects without wrapping them in an array. To solve the error,...
Read more >json.decoder.JSONDecodeError: Extra data: line 1 ... - GitHub
Translating anything fails with exception "json.decoder.JSONDecodeError: Extra data: line 1 column 300 (char 299)"
Read more >Extra data ||| While trying to read .json file : r/learnpython - Reddit
But when i try to read it with json.load, i have this error: json.decoder.JSONDecodeError: Extra data: line 14 column 2 (char 320).
Read more >json.decoder.JSONDecodeError: Extra data: line 2 ... - SyntaxFix
You have two records in your json file, and json.loads() is not able to decode more than one. You need to do it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mwoolweaver I’m sorry, I lost the failing JSON file, could you send it to koen@rwhrst.nl? Thanks.
Now that I reread the error it looks like it is somehow reading a Python dict instead of JSON file.
This should have been fixed with new data format Twitter uses. Please reopen if the issue persists with this new format.