Open Chenny2 opened 8 years ago
Same issue here :-(
Seems like it may happen when your archive file exists but is empty (technically also if malformed):
archive.rb
's initialize
: line ~50
@filetext = File.read(@path, :encoding => 'utf-8')
@tweets = JSON.parse(@filetext, symbolize_names: true)
log "Currently #{@tweets.length} tweets for #{@username}"
A quick fix would be to just put that in an if
that checks that @filetext
has length > 0
:
@filetext = File.read(@path, :encoding => 'utf-8')
if @filetext && @filetext.length > 0
@tweets = JSON.parse(@filetext, symbolize_names: true)
log "Currently #{@tweets.length} tweets for #{@username}"
end
Sometimes I get errors like that when archiving.