question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

json.decoder.JSONDecodeError: Extra data: line 1 column 12 (char 11)

See original GitHub issue
Traceback (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:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
koenrhcommented, Dec 4, 2019

@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.

0reactions
koenrhcommented, Feb 22, 2020

This should have been fixed with new data format Twitter uses. Please reopen if the issue persists with this new format.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found