Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about error #3

Open
lu-sitania opened this issue Jul 11, 2018 · 4 comments
Open

Question about error #3

lu-sitania opened this issue Jul 11, 2018 · 4 comments

Comments

@lu-sitania
Copy link

Hi there! Rather new at this. Using the Shame Eraser and when I confirm the tweets to be deleted, I get the following:

Deleting tweets...
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/csv.rb:1265:in `initialize': No such file or directory @ rb_sysopen - /Users/Cake/Downloads/twitter-2018-07-11-bee0ea850820165d40952a04b8b9903f5420231164c8463bacd58f976510b196/tweets.csv (Errno::ENOENT)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/csv.rb:1265:in `open'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/csv.rb:1265:in `open'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/csv.rb:1339:in `read'
	from bin/erase.rb:75:in `delete_tweets_in_file'
	from bin/erase.rb:116:in `<main>'

Some guidance on what I'm doing wrong would be great!

@ryanruppe
Copy link

It looks like Twitter recently changed their archive to give you tweets in json format instead of csv. So now the tweets archive is in tweet.js, but this script can't read that.

@ryanruppe
Copy link

Turns out this is the error if you try to import your Twitter Data, not your Twitter Archive. They seem similar but are very different. The Twitter Archive can be triggered by going to the bottom of https://twitter.com/settings/account and clicking "request your archive"

@anthony-lecossais
Copy link

Thanks Benjamin for this script !

The twitter archive is now also in JSON format. I forked the script to read this new format:
https://github.com/anthony-lecossais/shame-eraser/blob/master/bin/erase_json.rb

Sorry for the dirty code, it's my very first Ruby project but looks to do the job (at least on my account).

@colettecall
Copy link

Hey, thanks so much for the update, Anthony! I was using it this week and noticed a couple things going on for me, one being that I had to move and rename the Twitter-provided archive tweets file; the other being that I had to alter it to work with this. In case anyone else is coming by here with this problem, here's what I had to do. I would put this over in your fork but didn't see an "issues" available there.

I had to

  1. Copy "tweet.js" to the main archive folder--when I ran this with it in its original location in the "data" folder, it wasn't found.
  2. Rename it to "tweets.js" -- same issue

Then I had to

  1. open the tweets.js file and delete the leading text before the first straight bracket--in my file it was "window.YTD.tweet.part0 ="

The first part I assume is Twitter having changed how they name and organize parts of the archive since the last update. I guess the last part has something to do with this line not actually being 100% JSON? But anyway! This worked to delete the tweets, and that's what I'm here for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants