mispy-archive / twitter_ebooks Goto Github PK
View Code? Open in Web Editor NEWBetter twitterbots for all your friends~
License: MIT License
Better twitterbots for all your friends~
License: MIT License
ebooks auth
produces this error:
/usr/local/rvm/gems/ruby-2.1.5@global/gems/twitter_ebooks-3.0.2/bin/ebooks:185:in `require': cannot load such file -- oauth (LoadError)
from /usr/local/rvm/gems/ruby-2.1.5@global/gems/twitter_ebooks-3.0.2/bin/ebooks:185:in `auth'
from /usr/local/rvm/gems/ruby-2.1.5@global/gems/twitter_ebooks-3.0.2/bin/ebooks:325:in `command'
from /usr/local/rvm/gems/ruby-2.1.5@global/gems/twitter_ebooks-3.0.2/bin/ebooks:339:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.5/bin/ebooks:23:in `load'
from /usr/local/rvm/gems/ruby-2.1.5/bin/ebooks:23:in `<main>'
from /usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
I think it might be because you forgot to add 'oauth' to your gem dependencies, but you're requiring it.
otherwise you get https://twitter.com/SchafimHoersaal/status/606075348133003264
Currently, to add a bot, one would have to paste in both the username and the authentication tokens: this can lead to frustration if the username is misspelled, as the token would allow the bot to login, but no tweets would be processed.
If you GET account/verify_credentials, Twitter will send you the user information of the currently authenticated user, which contains the username - so that one would not need to hardcode the username.
In addition, this also allows a user to change the username that the bot is tweeting from without changing the code.
I kept getting this error when I tried to run ebooks start
. I traced it to a TCP connection issue with version 5.15.0 of the twitter gem: sferik/twitter-ruby#709
My workaround was to uninstall v. 5.15.0 of the twitter gem, and install 5.14.0, which fixes it. I understand this isn't an issue with your repo specifically, but wanted to make it easier for other people to find a workaround.
Running 'ebooks archive' to download my tweets worked fine the first time, but subsequent attempts to run it result in the following error:
Faraday::Builder is now Faraday::RackBuilder.
'
/usr/lib/ruby/1.9.1/json/common.rb:148:inencode': "\xC2" on US-ASCII (Encoding::InvalidByteSequenceError) from /usr/lib/ruby/1.9.1/json/common.rb:148:in
initialize'
from /usr/lib/ruby/1.9.1/json/common.rb:148:innew' from /usr/lib/ruby/1.9.1/json/common.rb:148:in
parse'
from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.2.6/lib/twitter_ebooks/archive.rb:50:ininitialize' from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.2.6/bin/ebooks:115:in
new'
from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.2.6/bin/ebooks:115:inarchive' from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.2.6/bin/ebooks:207:in
command'
from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.2.6/bin/ebooks:217:in<top (required)>' from /usr/local/bin/ebooks:23:in
load'
from /usr/local/bin/ebooks:23:in `
Not really an issue, but I figure I should let you know that I made a NPM module to import your Twitter backup file into a corpus for the consumer.
https://www.npmjs.org/package/backup-to-ebooks-archive
Great work on the library! ๐
Under Yosemite when I use Control-C to quit I get
^C/Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/gems/twitter_ebooks-3.0.0/bin/ebooks:268:in `join': Interrupt
from /Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/gems/twitter_ebooks-3.0.0/bin/ebooks:268:in `each'
from /Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/gems/twitter_ebooks-3.0.0/bin/ebooks:268:in `start'
from /Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/gems/twitter_ebooks-3.0.0/bin/ebooks:329:in `command'
from /Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/gems/twitter_ebooks-3.0.0/bin/ebooks:339:in `<top (required)>'
from /Users/ezmyrelda/.rvm/rubies/ruby-2.0.0-p598/bin/ebooks:23:in `load'
from /Users/ezmyrelda/.rvm/rubies/ruby-2.0.0-p598/bin/ebooks:23:in `<main>'
from /Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/bin/ruby_executable_hooks:15:in `eval'
from /Users/ezmyrelda/.rvm/gems/ruby-2.0.0-p598/bin/ruby_executable_hooks:15:in `<main>'
Is there some way I can fix this?
Looks like a copy/paste bug at https://github.com/mispy/twitter_ebooks/blob/master/bin/ebooks#L118
Just installed via gem on Ubuntu : and got this error.
v21@boris:~$ ebooks new v21_ebooks
/usr/local/bin/ebooks:19:in `load': /var/lib/gems/1.8/gems/twitter_ebooks-2.2.1/bin/ebooks:159: odd number list for Hash (SyntaxError)
tweet = { text: l }
^
/var/lib/gems/1.8/gems/twitter_ebooks-2.2.1/bin/ebooks:159: syntax error, unexpected ':', expecting '}'
tweet = { text: l }
^
from /usr/local/bin/ebooks:19
Nope, I'm wrong!
In SuffixGenerator.generate, there is this code:
start = site[0]
site[1].shuffle.each do |alt|
start, alt = site[0], site[1].sample
...
end
The shuffle and and the sample seem to be performing the same job and it could be turned into:
start = site[0]
site[1].shuffle.each do |alt|
...
end
with no change (other than the obvious pulling from a random source one less time).
If a model has very few tokens (say, there's only two tweets and two words in each), Model#make_statement will fall into an infinite loop because the generated tiki array will always be smaller than 3.
This line causes it.
I was able to get this to happen with only two sentences being sent to consume_lines before calling make_statement: 'foobar baz"'
and 'foobar quux'
.
Obviously, this is very edge-case-y.
Is there an event triggered in the streaming API for a retweet? Would it be possible or desireable to add a way to create an on_retweet handler? Maybe this is already possible? Currently I schedule a job to check for rewteets in the REST API. I would like to know about retweets sooner than I can with a scheduled job.
My use case is when someone retweets an image my bot created the bot then further manipulates that image as a way to thank them. (BTW, including #noRT in the retweet disables this feature in order to be nice for those who do not want a response.)
/home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/tweetstream-2.5.0/lib/tweetstream/client.rb:436:in `block in connect': Failed to reconnect after 11 tries. (TweetStream::ReconnectError)
from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/em-twitter-0.2.2/lib/em-twitter/connection.rb:296:in `call'
from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/em-twitter-0.2.2/lib/em-twitter/connection.rb:296:in `invoke_callback'
from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/em-twitter-0.2.2/lib/em-twitter/connection.rb:268:in `rescue in schedule_reconnect'
from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/em-twitter-0.2.2/lib/em-twitter/connection.rb:263:in `schedule_reconnect'
from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/em-twitter-0.2.2/lib/em-twitter/connection.rb:93:in `unbind'
from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:1440:in `event_callback'
from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
from /home/kivikakk/.rvm/gems/ruby-1.9.3-p392/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
from run.rb:5:in `<main>'
$
Currently it fails with an ENOENT.
I'll do a PR for this later. :)
Something has happened in the twitter source I use for my bot, as now when I attempt to execute ebooks archive
against it, it throws an exception.
Problem is, the archive output overfills the buffer and I can't see what it's choking on.
Any suggestions one how to get some type of logging of the output of archive when it errors, to find out what is messed up in the source?
First of all just saying I'm on Mac OS X Yosemite
When I try and run the bot after setting it up, using the command: 'ruby run.rb' and from the directory of the my_ebooks folder, I get this error:
Faraday::Builder is now Faraday::RackBuilder.
/Users/Rafi/Desktop/my_ebooks/bots.rb:12:in <top (required)>': undefined method
โraf_ebooks' for main:Object (NoMethodError)
from run.rb:32:in require_relative' from run.rb:32:in
What does this mean?
Thanks
I got this stacktrace when someone mentioned my bot
#<NoMethodError: undefined method `each_with_index' for nil:NilClass>
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/suffix.rb:59:in `block in generate'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/suffix.rb:56:in `upto'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/suffix.rb:56:in `generate'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:220:in `make_statement'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:288:in `make_response'
bots.rb:63:in `block in on_mention'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:353:in `call'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:353:in `delay'
bots.rb:61:in `on_mention'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:344:in `fire'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:287:in `receive_event'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:334:in `block in start'
/home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/client.rb:115:in `block in request'
/home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/response.rb:27:in `call'
/home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/response.rb:27:in `block in on_body'
/home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/response.rb:25:in `each'
/home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/response.rb:25:in `on_body'
/home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/response.rb:16:in `<<'
/home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/response.rb:16:in `<<'
/home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/connection.rb:22:in `stream'
/home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/client.rb:118:in `request'
/home/elad/.gem/ruby/gems/twitter-5.13.0/lib/twitter/streaming/client.rb:91:in `user'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:333:in `start'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/bin/ebooks:261:in `block (3 levels) in start'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/bin/ebooks:259:in `loop'
/home/elad/.gem/ruby/gems/twitter_ebooks-3.0.6/bin/ebooks:259:in `block (2 levels) in start'
It appears to happen only on a specific phrase ("ืืืืืง!")... I've reproduced it with two different models (in the console using model.make_statement), it appears to only affect models of users which mostly tweet in Hebrew. Removing the exclamation mark produces a valid result and no exception.
I was having this problem with an older 2.x version as well. I thought it might have been a ruby 1.9 problem so I upgraded to ruby 2.0, but the problem still persists:
(21:42:56) tape@charles:~/twitter_ebooks/tape> ebooks archive tape
New archive for @Tape at corpus/tape.json
/var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/response/raise_error.rb:15:in on_complete': Could not authenticate you (Twitter::Error::Unauthorized) from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:9:in
block in call'
from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:57:in on_complete' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:8:in
call'
from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/request/url_encoded.rb:15:in call' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/request/multipart.rb:14:in
call'
from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/request/multipart_with_file.rb:17:in call' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:in
build_response'
from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in run_request' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/connection.rb:140:in
get'
from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/request.rb:33:in perform' from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/utils.rb:51:in
perform_request'
from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/utils.rb:96:in perform_request_with_objects' from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/utils.rb:140:in
objects_from_response_with_user'
from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/timelines.rb:49:in user_timeline' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/lib/twitter_ebooks/archive.rb:77:in
block in sync'
from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/lib/twitter_ebooks/archive.rb:74:in loop' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/lib/twitter_ebooks/archive.rb:74:in
sync'
from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:152:in archive' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:324:in
command'
from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:341:in <top (required)>' from /usr/local/bin/ebooks:23:in
load'
from /usr/local/bin/ebooks:23:in `
currently have twitter_ebooks 3.0.4.
C:\Ruby193\devkit\my_ebooks>ebooks tweet C:\Ruby193\devkit\my_ebooks\model\my_eb
ooks.model TheTaZe_ebooks
Faraday::Builder is now Faraday::RackBuilder.
Rending a video in After Effects.
Rending a video that will take about 4 hours.
Rending a video that will take about an hour to render.
@TheTaZe_ebooks: Rending a video that I click on have to be a British guy?
@TheTaZe_ebooks: Tweeting ["Rending a video that I click on have to be a British
guy?"]
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:800:in connect': SSL_connect returned=1 e rrno=0 state=SSLv3 read server certificate B: certificate verify failed (Twitter ::Error::ClientError) from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:800:in
block in connect'
from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:69:in timeout' from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:100:in
timeout'
from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:800:in connect' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:756:in
do_start'
from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:745:in start' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1285:in
request'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/adapt
er/net_http.rb:80:in perform_request' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/adapt er/net_http.rb:39:in
call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/respo
nse.rb:8:in call' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/respo nse.rb:8:in
call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/respo
nse.rb:8:in call' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/reque st/url_encoded.rb:15:in
call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/reque
st/multipart.rb:14:in call' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/reque st/multipart_with_file.rb:14:in
call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/rack_
builder.rb:139:in build_response' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/conne ction.rb:377:in
run_request'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/faraday-0.9.0/lib/faraday/conne
ction.rb:177:in post' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/clien t.rb:108:in
request'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/clien
t.rb:72:in post' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/api/u tils.rb:82:in
object_from_response'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/api/t
weets.rb:129:in update' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter_ebooks-2.3.2/lib/twitte r_ebooks/bot.rb:164:in
tweet'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter_ebooks-2.3.2/bin/ebooks
:137:in tweet' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter_ebooks-2.3.2/bin/ebooks :208:in
command'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/twitter_ebooks-2.3.2/bin/ebooks
:217:in <top (required)>' from C:/Ruby193/bin/ebooks:23:in
load'
from C:/Ruby193/bin/ebooks:23:in `
I have been getting this error and I don't know what to do with it?
Installed the gem OK, but upon attempting to use the ebooks
command to create a folder, I hit this error:
Something to do with 31669ed maybe?
From the logs:
Dec 19 11:10:29 urvxt-urabe heroku/worker.1: State changed from crashed to starting
Dec 19 11:10:32 urvxt-urabe heroku/worker.1: Starting process with command `bundle exec ebooks start`
Dec 19 11:10:33 urvxt-urabe heroku/worker.1: State changed from starting to up
Dec 19 11:10:34 urvxt-urabe app/worker.1: DISCLAIMER: This version of urvxt-urabe is modified specifically for Heroku deployment.
Dec 19 11:10:34 urvxt-urabe app/worker.1: Compatible with twitter_ebooks 3.x
Dec 19 11:10:34 urvxt-urabe app/worker.1: @weetabix_ebooks: Loading model
Dec 19 11:10:34 urvxt-urabe app/worker.1: /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:49:in `initialize': no implicit conversion of nil into String (TypeError)
Dec 19 11:10:34 urvxt-urabe app/worker.1: from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:49:in `open'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:49:in `block in load'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:48:in `instance_eval'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/model.rb:48:in `load'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from bots.rb:207:in `load_model!'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from bots.rb:40:in `configure'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/lib/twitter_ebooks/bot.rb:183:in `initialize'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from bots.rb:212:in `new'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from bots.rb:212:in `newbot'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from bots.rb:223:in `<top (required)>'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/bin/ebooks:307:in `load'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/bin/ebooks:307:in `load_bots'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/bin/ebooks:238:in `start'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/bin/ebooks:331:in `command'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from /app/vendor/bundle/ruby/2.1.0/gems/twitter_ebooks-3.0.6/bin/ebooks:342:in `<top (required)>'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from /app/vendor/bundle/ruby/2.1.0/bin/ebooks:23:in `load'
Dec 19 11:10:34 urvxt-urabe app/worker.1: from /app/vendor/bundle/ruby/2.1.0/bin/ebooks:23:in `<main>'
Dec 19 11:10:35 urvxt-urabe heroku/worker.1: Process exited with status 1
Dec 19 11:10:35 urvxt-urabe heroku/worker.1: State changed from up to crashed
All the models are rebuilt using twitter_ebooks 3.0.6. Same error occurs when running 3.0.4.
Twitter has an option to download your archive of tweets all the way back, and it generally takes only a few minutes. It gives you the tweets in a big CSV, as well as JSON files divided by month. It would be nice to be able to use this as the corpus. I havent had the time to delve into the code to see how the current corpus is generated, but it probably wouldnt be too hard to parse it and generate a corpus in your current format.
When I use unicode input, all keywords get cutoff at that unicode. I found the reason.
In nlp.rb, line 102:
set :word_pattern, /(?<!@)(?<=\s)[\w']+/
should be
set :word_pattern, /(?<!@)(?<=\s)[\p{Word}']+/
twitter_ebooks
can't seem to handle rate-limiting and instead crashes (my use case is just the archive
subcommand, I don't know if this is true in the rest of the subcommands)
This is a feature request to instead keep twitter_ebooks running, delay, and retry. This could possibly enabled via a command-line option switch, possibly be always-on.
It would be awesome if there was a built in utility to convert twitter's archive .js files to a json file that twitter_ebooks can parse.
Hey; I'm on the latest version of twitter_ebooks. I have my bot running on Heroku, and it doesn't seem to be tweeting. My on_startup
usually looks like this:
def on_startup
#10% chance to make a tweet in any hour
if rand > 0.9
tweet(model.make_statement)
end
end
My bot hasn't written its own tweet in almost two weeks. This started right about the time I upgraded to the latest major version of twitter_ebooks. To debug, I removed the conditional statement. So, after deploys, my bot should be immediately tweeting. But it isn't. A quick call of heroku logs
also shows no errors. Only that my bot is streaming tweets. This makes me think there might be something up with the on_startup
method... Any thoughts?
When trying to install the software through gem on Mac OS, the following error occurs when gem tries to compile:
linking shared-object rubyeventmachine.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [rubyeventmachine.bundle] Error 1
The error seems to stem from a change in Xcode 5.1 which removed GCC in favour of clang, but I could not get it to run, even when using the exports described in the linked Stackoverflow post.
I realise this is not exactly a problem in your code, just wanted to give a heads-up and a place for other users to compare notes.
My full terminal log is below.
bash-3.2# gem install twitter_ebooks
Building native extensions. This could take a while...
ERROR: Error installing twitter_ebooks:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for sys/event.h... yes
checking for sys/queue.h... yes
creating Makefile
make "DESTDIR="
compiling binder.cpp
compiling cmain.cpp
compiling ed.cpp
compiling em.cpp
compiling kb.cpp
compiling page.cpp
compiling pipe.cpp
compiling rubymain.cpp
rubymain.cpp:330:17: warning: 'BIO_s_mem' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
out = BIO_new(BIO_s_mem());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:626:13: note: 'BIO_s_mem' declared here
BIO_METHOD *BIO_s_mem(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
rubymain.cpp:330:9: warning: 'BIO_new' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
out = BIO_new(BIO_s_mem());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:591:7: note: 'BIO_new' declared here
BIO * BIO_new(BIO_METHOD *type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
rubymain.cpp:332:3: warning: 'BIO_ctrl' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
BIO_get_mem_ptr(out, &buf);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:506:31: note: expanded from macro 'BIO_get_mem_ptr'
#define BIO_get_mem_ptr(b,pp) BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0,(char *)pp)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:600:6: note: 'BIO_ctrl' declared here
long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
rubymain.cpp:335:3: warning: 'BIO_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
BIO_free(out);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:593:5: note: 'BIO_free' declared here
int BIO_free(BIO *a) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
4 warnings generated.
compiling ssl.cpp
ssl.cpp:97:13: warning: 'BIO_new_mem_buf' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
BIO *bio = BIO_new_mem_buf (PrivateMaterials, -1);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:627:6: note: 'BIO_new_mem_buf' declared here
BIO *BIO_new_mem_buf(void *buf, int len) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:102:3: warning: 'EVP_PKEY_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
EVP_PKEY_free (DefaultPrivateKey);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/evp.h:885:7: note: 'EVP_PKEY_free' declared here
void EVP_PKEY_free(EVP_PKEY *pkey) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:114:2: warning: 'BIO_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
BIO_free (bio);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:593:5: note: 'BIO_free' declared here
int BIO_free(BIO *a) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:138:3: warning: 'SSL_library_init' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_library_init();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1553:5: note: 'SSL_library_init' declared here
int SSL_library_init(void ) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:139:3: warning: 'SSL_library_init' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
OpenSSL_add_ssl_algorithms();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1141:38: note: expanded from macro 'OpenSSL_add_ssl_algorithms'
#define OpenSSL_add_ssl_algorithms() SSL_library_init()
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1553:5: note: 'SSL_library_init' declared here
int SSL_library_init(void ) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:140:3: warning: 'OPENSSL_add_all_algorithms_noconf' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
OpenSSL_add_all_algorithms();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/evp.h:836:3: note: expanded from macro 'OpenSSL_add_all_algorithms'
OPENSSL_add_all_algorithms_noconf()
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/evp.h:828:6: note: 'OPENSSL_add_all_algorithms_noconf' declared here
void OPENSSL_add_all_algorithms_noconf(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:141:3: warning: 'SSL_load_error_strings' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_load_error_strings();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1416:6: note: 'SSL_load_error_strings' declared here
void SSL_load_error_strings(void ) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:142:3: warning: 'ERR_load_crypto_strings' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
ERR_load_crypto_strings();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/err.h:296:6: note: 'ERR_load_crypto_strings' declared here
void ERR_load_crypto_strings(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:148:34: warning: 'SSLv23_server_method' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
pCtx = SSL_CTX_new (is_server ? SSLv23_server_method() : SSLv23_client_method());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1516:13: note: 'SSLv23_server_method' declared here
SSL_METHOD *SSLv23_server_method(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER; /* SSLv3 but can rollback to v2 */
^
ssl.cpp:148:59: warning: 'SSLv23_client_method' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
pCtx = SSL_CTX_new (is_server ? SSLv23_server_method() : SSLv23_client_method());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1517:13: note: 'SSLv23_client_method' declared here
SSL_METHOD *SSLv23_client_method(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER; /* SSLv3 but can rollback to v2 */
^
ssl.cpp:148:9: warning: 'SSL_CTX_new' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
pCtx = SSL_CTX_new (is_server ? SSLv23_server_method() : SSLv23_client_method());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1346:10: note: 'SSL_CTX_new' declared here
SSL_CTX *SSL_CTX_new(SSL_METHOD *meth) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:152:2: warning: 'SSL_CTX_ctrl' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_CTX_set_options (pCtx, SSL_OP_ALL);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:571:2: note: expanded from macro 'SSL_CTX_set_options'
SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1498:6: note: 'SSL_CTX_ctrl' declared here
long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:162:8: warning: 'SSL_CTX_use_PrivateKey_file' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
e = SSL_CTX_use_PrivateKey_file (pCtx, privkeyfile.c_str(), SSL_FILETYPE_PEM);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1401:5: note: 'SSL_CTX_use_PrivateKey_file' declared here
int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:164:8: warning: 'SSL_CTX_use_PrivateKey' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
e = SSL_CTX_use_PrivateKey (pCtx, DefaultPrivateKey);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1466:5: note: 'SSL_CTX_use_PrivateKey' declared here
int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:165:15: warning: 'ERR_print_errors_fp' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (e <= 0) ERR_print_errors_fp(stderr);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/err.h:287:6: note: 'ERR_print_errors_fp' declared here
void ERR_print_errors_fp(FILE *fp) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:169:8: warning: 'SSL_CTX_use_certificate_chain_file' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
e = SSL_CTX_use_certificate_chain_file (pCtx, certchainfile.c_str());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1403:5: note: 'SSL_CTX_use_certificate_chain_file' declared here
int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER; /* PEM type */
^
ssl.cpp:171:8: warning: 'SSL_CTX_use_certificate' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
e = SSL_CTX_use_certificate (pCtx, DefaultCertificate);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1469:5: note: 'SSL_CTX_use_certificate' declared here
int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:172:15: warning: 'ERR_print_errors_fp' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (e <= 0) ERR_print_errors_fp(stderr);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/err.h:287:6: note: 'ERR_print_errors_fp' declared here
void ERR_print_errors_fp(FILE *fp) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:176:2: warning: 'SSL_CTX_set_cipher_list' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_CTX_set_cipher_list (pCtx, "ALL:!ADH:!LOW:!EXP:!DES-CBC3-SHA:@STRENGTH");
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1345:5: note: 'SSL_CTX_set_cipher_list' declared here
int SSL_CTX_set_cipher_list(SSL_CTX *,const char *str) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:179:3: warning: 'SSL_CTX_ctrl' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_CTX_sess_set_cache_size (pCtx, 128);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1604:2: note: expanded from macro 'SSL_CTX_sess_set_cache_size'
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_SIZE,t,NULL)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1498:6: note: 'SSL_CTX_ctrl' declared here
long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:180:3: warning: 'SSL_CTX_set_session_id_context' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_CTX_set_session_id_context (pCtx, (unsigned char*)"eventmachine", 12);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1478:5: note: 'SSL_CTX_set_session_id_context' declared here
int SSL_CTX_set_session_id_context(SSL_CTX *ctx,const unsigned char *sid_ctx,
^
ssl.cpp:185:8: warning: 'SSL_CTX_use_PrivateKey_file' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
e = SSL_CTX_use_PrivateKey_file (pCtx, privkeyfile.c_str(), SSL_FILETYPE_PEM);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1401:5: note: 'SSL_CTX_use_PrivateKey_file' declared here
int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:186:16: warning: 'ERR_print_errors_fp' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (e <= 0) ERR_print_errors_fp(stderr);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/err.h:287:6: note: 'ERR_print_errors_fp' declared here
void ERR_print_errors_fp(FILE *fp) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:190:8: warning: 'SSL_CTX_use_certificate_chain_file' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
e = SSL_CTX_use_certificate_chain_file (pCtx, certchainfile.c_str());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1403:5: note: 'SSL_CTX_use_certificate_chain_file' declared here
int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER; /* PEM type */
^
ssl.cpp:191:16: warning: 'ERR_print_errors_fp' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (e <= 0) ERR_print_errors_fp(stderr);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/err.h:287:6: note: 'ERR_print_errors_fp' declared here
void ERR_print_errors_fp(FILE *fp) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:206:3: warning: 'SSL_CTX_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_CTX_free (pCtx);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1347:6: note: 'SSL_CTX_free' declared here
void SSL_CTX_free(SSL_CTX *) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:208:3: warning: 'EVP_PKEY_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
EVP_PKEY_free (PrivateKey);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/evp.h:885:7: note: 'EVP_PKEY_free' declared here
void EVP_PKEY_free(EVP_PKEY *pkey) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:234:22: warning: 'BIO_s_mem' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
pbioRead = BIO_new (BIO_s_mem());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:626:13: note: 'BIO_s_mem' declared here
BIO_METHOD *BIO_s_mem(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:234:13: warning: 'BIO_new' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
pbioRead = BIO_new (BIO_s_mem());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:591:7: note: 'BIO_new' declared here
BIO * BIO_new(BIO_METHOD *type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:237:23: warning: 'BIO_s_mem' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
pbioWrite = BIO_new (BIO_s_mem());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:626:13: note: 'BIO_s_mem' declared here
BIO_METHOD *BIO_s_mem(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:237:14: warning: 'BIO_new' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
pbioWrite = BIO_new (BIO_s_mem());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:591:7: note: 'BIO_new' declared here
BIO * BIO_new(BIO_METHOD *type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:240:9: warning: 'SSL_new' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
pSSL = SSL_new (Context->pCtx);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1481:7: note: 'SSL_new' declared here
SSL * SSL_new(SSL_CTX *ctx) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:242:2: warning: 'SSL_set_bio' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_set_bio (pSSL, pbioRead, pbioWrite);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1375:6: note: 'SSL_set_bio' declared here
void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:245:2: warning: 'SSL_set_ex_data' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_set_ex_data(pSSL, 0, (void*) binding);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1586:5: note: 'SSL_set_ex_data' declared here
int SSL_set_ex_data(SSL *ssl,int idx,void *data) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:248:3: warning: 'SSL_set_verify' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_set_verify(pSSL, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE, ssl_verify_wrapper);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1384:6: note: 'SSL_set_verify' declared here
void SSL_set_verify(SSL *s, int mode,
^
ssl.cpp:251:3: warning: 'SSL_connect' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_connect (pSSL);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1492:6: note: 'SSL_connect' declared here
int SSL_connect(SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:264:7: warning: 'SSL_get_shutdown' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (SSL_get_shutdown (pSSL) & SSL_RECEIVED_SHUTDOWN)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1568:5: note: 'SSL_get_shutdown' declared here
int SSL_get_shutdown(const SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:265:4: warning: 'SSL_shutdown' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_shutdown (pSSL);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1532:5: note: 'SSL_shutdown' declared here
int SSL_shutdown(SSL *s) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:267:4: warning: 'SSL_clear' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_clear (pSSL);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1353:5: note: 'SSL_clear' declared here
int SSL_clear(SSL *s) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:268:3: warning: 'SSL_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
SSL_free (pSSL);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1490:6: note: 'SSL_free' declared here
void SSL_free(SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:285:10: warning: 'BIO_write' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
int n = BIO_write (pbioRead, buf, bufsize);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:597:5: note: 'BIO_write' declared here
int BIO_write(BIO *b, const void *data, int len) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:297:7: warning: 'SSL_state' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (!SSL_is_init_finished (pSSL)) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1115:35: note: expanded from macro 'SSL_is_init_finished'
#define SSL_is_init_finished(a) (SSL_state(a) == SSL_ST_OK)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1581:5: note: 'SSL_state' declared here
int SSL_state(const SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:298:23: warning: 'SSL_accept' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
int e = bIsServer ? SSL_accept (pSSL) : SSL_connect (pSSL);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1491:6: note: 'SSL_accept' declared here
int SSL_accept(SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:298:43: warning: 'SSL_connect' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
int e = bIsServer ? SSL_accept (pSSL) : SSL_connect (pSSL);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1492:6: note: 'SSL_connect' declared here
int SSL_connect(SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:300:13: warning: 'SSL_get_error' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
int er = SSL_get_error (pSSL, e);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1501:5: note: 'SSL_get_error' declared here
int SSL_get_error(const SSL *s,int ret_code) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:312:7: warning: 'SSL_state' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (!SSL_is_init_finished (pSSL)) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1115:35: note: expanded from macro 'SSL_is_init_finished'
#define SSL_is_init_finished(a) (SSL_state(a) == SSL_ST_OK)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1581:5: note: 'SSL_state' declared here
int SSL_state(const SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:321:10: warning: 'SSL_read' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
int n = SSL_read (pSSL, buf, bufsize);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1493:6: note: 'SSL_read' declared here
int SSL_read(SSL *ssl,void *buf,int num) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:326:7: warning: 'SSL_get_error' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (SSL_get_error (pSSL, n) == SSL_ERROR_WANT_READ) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1501:5: note: 'SSL_get_error' declared here
int SSL_get_error(const SSL *s,int ret_code) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:346:9: warning: 'BIO_ctrl' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
return BIO_pending (pbioWrite) ? true : false;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:524:30: note: expanded from macro 'BIO_pending'
#define BIO_pending(b) (int)BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:600:6: note: 'BIO_ctrl' declared here
long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:360:9: warning: 'BIO_read' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
return BIO_read (pbioWrite, buf, bufsize);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:595:5: note: 'BIO_read' declared here
int BIO_read(BIO *b, void *data, int len) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:390:7: warning: 'SSL_state' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
if (!SSL_is_init_finished (pSSL))
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1115:35: note: expanded from macro 'SSL_is_init_finished'
#define SSL_is_init_finished(a) (SSL_state(a) == SSL_ST_OK)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1581:5: note: 'SSL_state' declared here
int SSL_state(const SSL *ssl) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:401:11: warning: 'SSL_write' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
int n = SSL_write (pSSL, page, length);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1495:6: note: 'SSL_write' declared here
int SSL_write(SSL *ssl,const void *buf,int num) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:407:13: warning: 'SSL_get_error' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
int er = SSL_get_error (pSSL, n);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1501:5: note: 'SSL_get_error' declared here
int SSL_get_error(const SSL *s,int ret_code) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:432:10: warning: 'SSL_get_peer_certificate' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
cert = SSL_get_peer_certificate(pSSL);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1450:8: note: 'SSL_get_peer_certificate' declared here
X509 * SSL_get_peer_certificate(const SSL *s) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:451:9: warning: 'X509_STORE_CTX_get_current_cert' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
cert = X509_STORE_CTX_get_current_cert(ctx);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/x509_vfy.h:454:8: note: 'X509_STORE_CTX_get_current_cert' declared here
X509 * X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:452:47: warning: 'SSL_get_ex_data_X509_STORE_CTX_idx' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
ssl = (SSL*) X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1601:5: note: 'SSL_get_ex_data_X509_STORE_CTX_idx' declared here
int SSL_get_ex_data_X509_STORE_CTX_idx(void ) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:452:15: warning: 'X509_STORE_CTX_get_ex_data' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
ssl = (SSL*) X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/x509_vfy.h:450:8: note: 'X509_STORE_CTX_get_ex_data' declared here
void * X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx,int idx) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:453:28: warning: 'SSL_get_ex_data' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
binding = (unsigned long) SSL_get_ex_data(ssl, 0);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/ssl.h:1587:7: note: 'SSL_get_ex_data' declared here
void *SSL_get_ex_data(const SSL *ssl,int idx) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:455:16: warning: 'BIO_s_mem' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
out = BIO_new(BIO_s_mem());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:626:13: note: 'BIO_s_mem' declared here
BIO_METHOD *BIO_s_mem(void) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:455:8: warning: 'BIO_new' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
out = BIO_new(BIO_s_mem());
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:591:7: note: 'BIO_new' declared here
BIO * BIO_new(BIO_METHOD *type) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:457:2: warning: 'BIO_write' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
BIO_write(out, "\0", 1);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:597:5: note: 'BIO_write' declared here
int BIO_write(BIO *b, const void *data, int len) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:458:2: warning: 'BIO_ctrl' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
BIO_get_mem_ptr(out, &buf);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:506:31: note: expanded from macro 'BIO_get_mem_ptr'
#define BIO_get_mem_ptr(b,pp) BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0,(char *)pp)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:600:6: note: 'BIO_ctrl' declared here
long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
ssl.cpp:462:2: warning: 'BIO_free' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
BIO_free(out);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/openssl/bio.h:593:5: note: 'BIO_free' declared here
int BIO_free(BIO *a) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
^
63 warnings generated.
linking shared-object rubyeventmachine.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [rubyeventmachine.bundle] Error 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/eventmachine-1.0.3 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/eventmachine-1.0.3/ext/gem_make.out
bash-3.2# ruby
I have generated the model, and added in all the auth stuff in my generated bot. But when I run
ruby run.rb
it all fires up just fine, but nothing ever happens. I'm fairly certain it doesn't actually connect to twitter, either, as I replace the keys, secrets, and tokens with gibberish (or even completely comment them out) and it still fires up without error.
I'm sure I'm missing something here. My steps:
ebooks new mattbot
to create the new repo bot.on_mention do |tweet, meta|
# Reply to a mention
bot.reply(tweet, meta[:reply_prefix] + "oh hullo")
end
bot.on_timeline do |tweet, meta|
# Reply to a tweet in the bot's timeline
bot.reply(tweet, meta[:reply_prefix] + "nice tweet")
end
ruby run.rb
๏ฃฟ ~/src/mattbot/ [master] ruby run.rb
Faraday::Builder is now Faraday::RackBuilder.
@mattbot: starting stream for petechesbot
@mattbot: Online!
What am I missing?
_For the record, I tried this all by pushing it to heroku first, with much the same result. I switched back to running ruby run.rb
locally for efficiency of troubleshooting_
Nothing in on_message is getting run when I try to send my bots a message. I know my bot does have access to direct messages because I can see my bot receiving direct messages in its logs.
When I attempt to run ebooks gen model/mymodel.model, I get:
Faraday::Builder is now Faraday::RackBuilder.
/var/lib/gems/1.9.1/gems/twitter_ebooks-2.3.2/lib/twitter_ebooks/model.rb:21:in `block in load': undefined method `[]' for #<Ebooks::Model:0x000000015c5908> (NoMethodError)
from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.3.2/lib/twitter_ebooks/model.rb:19:in `instance_eval'
from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.3.2/lib/twitter_ebooks/model.rb:19:in `load'
from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.3.2/bin/ebooks:77:in `gen'
from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.3.2/bin/ebooks:205:in `command'
from /var/lib/gems/1.9.1/gems/twitter_ebooks-2.3.2/bin/ebooks:217:in `<top (required)>'
from /usr/local/bin/ebooks:23:in `load'
from /usr/local/bin/ebooks:23:in `<main>'
I'm using Twitter_ebooks 2.3.2 on Ubuntu 14.04 with Ruby 1.9.1. This model was generated on one of the 2.2.* versions; using this with a 2.3.2-generated model worked fine.
On OS X Mountain Lion and Mavericks, archive.rb will be placed in a path such as: /Library/Ruby/Gems/2.0.0/gems/twitter_ebooks-2.1.5/lib/twitter_ebooks/archive.rb
The CONFIG_PATH variable is set to "/home/#{ENV['USER']}/.ebooksrc" but that doesn't exist on OS X, so an error occurs when trying to initiate a repo. Could we make this more relative so it works on both Linux and Unix systems?
For OS X, the correct path is "/Users/[user]/.ebooksrc" - would replacing it with ${HOME} work in this case?
Tried converting the csv with jsonify command, then used archive. Gave me an error with:
/twitter-4.8.1/lib/twitter/response/raise_error.rb:21:in `on_complete': since_id parameter is invalid. (Twitter::Error::BadRequest)
@wota_ebooks: Tweeting ["FBI is part of why I want the Diary."]
/home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.8/lib/twitter_ebooks/bot.rb:163:in tweet': undefined method
update' for nil:NilClass (NoMethodError)
from /home/kyanha/work/ebooks/wota_ebooks/bots.rb:18:in block in <top (required)>' from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.8/lib/twitter_ebooks/bot.rb:28:in
call'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.8/lib/twitter_ebooks/bot.rb:28:in initialize' from /home/kyanha/work/ebooks/wota_ebooks/bots.rb:8:in
new'
from /home/kyanha/work/ebooks/wota_ebooks/bots.rb:8:in <top (required)>' from run.rb:3:in
require_relative'
from run.rb:3:in `
I'm having trouble getting the provided tests to run without failures. It seems the memory profiling bits might be missing something in my environment. Has anyone else experienced this issue?
Failures:
When no suitable sentence is found and variant is nil in SuffixGenerator.generate, the upto loop is not exited, and no changes are done to find another sentence before looping again on the same tikis variable (which will always get the same result). This means that the same work is being done for every loop with no improvement.
What's supposed to happen there? I imagine a break. Something like replacing tikis = variant if variant
with if variant; tikis = variant; else; break; end
so that the caller of generate can try again.
I'm not entirely sure how this happened, but a bot appears to have received the same tweet multiple times in its timeline, and attempted both times to favourite it. This caused a You have already favorited this status. (Twitter::Error::Forbidden)
to be thrown and for the bot to crash entirely.
I can't figure out what causes this, but it doesn't happen all the time. A few days ago, it happened, but then on my next archive
/consume
cycle it didn't.
Just upgraded to 2.2.2 etc.
ebooks:19$ bin/ebooks consume corpus/zigg.json
Faraday::Builder is now Faraday::RackBuilder.
Reading json corpus from corpus/zigg.json
Removing commented lines and sorting mentions
Segmenting text into sentences
Tokenizing 7411 statements and 9233 mentions
Ranking keywords
/home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/bloomfilter-rb-2.1.1/lib/bloomfilter/native.rb:20:in `new': random seed (ArgumentError)
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/bloomfilter-rb-2.1.1/lib/bloomfilter/native.rb:20:in `initialize'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/wordlist.rb:111:in `new'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/wordlist.rb:111:in `init_bloom_filter'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/wordlist.rb:41:in `initialize'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/wordlist.rb:31:in `new'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/wordlist.rb:31:in `load'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/wordlist.rb:13:in `load_file'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/blacklist.rb:15:in `load_default_file'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/highscore-1.2.0/lib/highscore/content.rb:17:in `initialize'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/lib/twitter_ebooks/nlp.rb:76:in `new'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/lib/twitter_ebooks/nlp.rb:76:in `keywords'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/lib/twitter_ebooks/model.rb:73:in `consume'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/lib/twitter_ebooks/model.rb:13:in `consume'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/bin/ebooks:58:in `block in consume'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/bin/ebooks:53:in `each'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/bin/ebooks:53:in `consume'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/bin/ebooks:194:in `command'
from /home/ebooks/zigg_ebooks/vendor/bundle/ruby/1.9.1/gems/twitter_ebooks-2.2.2/bin/ebooks:204:in `<top (required)>'
from bin/ebooks:16:in `load'
from bin/ebooks:16:in `<main>'
Because I like being weird, I'm running this in a dedicated user account on OpenBSD. ๐
whenever i do run ebooks start, i get the following:
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/twitter_ebooks-3.1.0/bin/ebooks:354:in
load': bots.rb:137: syntax error, unexpected keyword_end, expecting end-of-input (SyntaxError) from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/twitter_ebooks-3.1.0/bin/eb ooks:354:in
load_bots'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/twitter_ebooks-3.1.0/bin/eb
ooks:285:in start' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/twitter_ebooks-3.1.0/bin/eb ooks:378:in
command'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/twitter_ebooks-3.1.0/bin/eb
ooks:389:in <top (required)>' from C:/Ruby200-x64/bin/ebooks:23:in
load'
from C:/Ruby200-x64/bin/ebooks:23:in `/main/'
I'm guessing the syntax error is in the bots.rb file, but I'm not sure what it is since it's an exact copy of the ebooks_example bots.rb populated with the twitter keys, and username.
*main is in angle brackets
Seeing 4-5 gb ram+swap used whenever I invoke 'tweet' functionality. Granted the model I'm using is quite large but still: this limits how much ram the rest of my system has to work with a great deal.
I followed the basic instructions in setting this up but I'm finding a couple of issues.
Mentions aren't received at all and after a dm is received the bot replies to the sender, but then receives its own sent dm which it attempts to reply to until the API prevents it from doing so.
Has anyone come across this behaviour?
$ ebooks archive wolfoftheair corpus/wolfoftheair.json
Faraday::Builder is now Faraday::RackBuilder.
New archive for @wolfoftheair at corpus/wolfoftheair.json
/home/kyanha/lib/ruby/gems/2.1.0/gems/simple_oauth-0.3.0/lib/simple_oauth/header.rb:88:in attributes': SimpleOAuth: Found extra option keys not matching ATTRIBUTE_KEYS: (RuntimeError) [:consumer_secret, :token_secret] from /home/kyanha/lib/ruby/gems/2.1.0/gems/simple_oauth-0.3.0/lib/simple_oauth/header.rb:74:in
signed_attributes'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/simple_oauth-0.3.0/lib/simple_oauth/header.rb:80:in normalized_attributes' from /home/kyanha/lib/ruby/gems/2.1.0/gems/simple_oauth-0.3.0/lib/simple_oauth/header.rb:62:in
to_s'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter-4.8.1/lib/twitter/client.rb:101:in block in request_setup' from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:142:in
block in get'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:374:in block in run_request' from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:388:in
block in build_request'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/request.rb:26:in block in create' from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/request.rb:25:in
tap'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/request.rb:25:in create' from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:384:in
build_request'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:370:in run_request' from /home/kyanha/lib/ruby/gems/2.1.0/gems/faraday-0.9.0/lib/faraday/connection.rb:140:in
get'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter-4.8.1/lib/twitter/client.rb:108:in request' from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter-4.8.1/lib/twitter/client.rb:66:in
get'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter-4.8.1/lib/twitter/api/utils.rb:51:in objects_from_response' from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter-4.8.1/lib/twitter/api/utils.rb:42:in
objects_from_response_with_user'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter-4.8.1/lib/twitter/api/timelines.rb:53:in user_timeline' from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.6/lib/twitter_ebooks/archive.rb:73:in
block in sync'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.6/lib/twitter_ebooks/archive.rb:71:in loop' from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.6/lib/twitter_ebooks/archive.rb:71:in
sync'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.6/bin/ebooks:115:in archive' from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.6/bin/ebooks:207:in
command'
from /home/kyanha/lib/ruby/gems/2.1.0/gems/twitter_ebooks-2.2.6/bin/ebooks:217:in <top (required)>' from /home/kyanha/bin/ebooks:23:in
load'
from /home/kyanha/bin/ebooks:23:in `
I'm having trouble using 'ebooks consume-all' to consume my tweets.csv from the twitter backup download AND an updated file from running 'ebooks archive'.
I thought I'd try to jsonify tweets.csv but it appears the function is gone in 3.x?
Unless I'm misunderstanding how this works, is https://github.com/mispy/twitter_ebooks/blob/master/skeleton/bots.rb supposed to be different to the one in the one at the example bot https://github.com/mispy/ebooks_example/blob/master/bots.rb
original bug page: #24
I've upgraded to ruby 2.0 and am now running twitter_ebooks 3.0.4, but I still get this exact same error.
I've set my locale to utf-8 as suggested in that bug.
the output looks slightly different since I now have ruby 2.0 but it's basically the same as before:
/var/lib/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in encode': "\xCE" on US-ASCII (Encoding::InvalidByteSequenceError) from /var/lib/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in
initialize'
from /var/lib/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in new' from /var/lib/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in
parse'
from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/lib/twitter_ebooks/archive.rb:53:in initialize' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:152:in
new'
from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:152:in archive' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:324:in
command'
from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:341:in <top (required)>' from /usr/local/bin/ebooks:23:in
load'
from /usr/local/bin/ebooks:23:in `
I'm getting the following error when I run: ebooks start
/var/lib/gems/2.1.0/gems/twitter_ebooks-3.1.2/bin/ebooks:332:in `join': No live threads left. Deadlock? (fatal)
from /var/lib/gems/2.1.0/gems/twitter_ebooks-3.1.2/bin/ebooks:332:in `each'
from /var/lib/gems/2.1.0/gems/twitter_ebooks-3.1.2/bin/ebooks:332:in `start'
from /var/lib/gems/2.1.0/gems/twitter_ebooks-3.1.2/bin/ebooks:410:in `command'
from /var/lib/gems/2.1.0/gems/twitter_ebooks-3.1.2/bin/ebooks:422:in `<top (required)>'
from /usr/local/bin/ebooks:23:in `load'
from /usr/local/bin/ebooks:23:in `<main>'
I'm running:
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
twitter_ebooks (3.1.2, 3.0.0)
Any ideas?
On stock debian:
sudo gem install twitter_ebooks
ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: twitter_ebooks requires twitter (~> 4.0); tweetstream requires twitter (~> 5.5)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.