sferik / t-ruby

A command-line power tool for Twitter.
http://sferik.github.com/t
MIT License
5.43k stars 409 forks source link

t steam timeline error #286

Open Kamil1 opened 9 years ago

Kamil1 commented 9 years ago

There appears to be an issue with t stream timeline, with me receiving the following output when the command is inputted.

/Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/twitter-5.15.0/lib/twitter/streaming/connection.rb:16:in initialize': Can't assign requested address - connect(2) for "199.59.148.241" port (Errno::EADDRNOTAVAIL) from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/twitter-5.15.0/lib/twitter/streaming/connection.rb:16:innew' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/twitter-5.15.0/lib/twitter/streaming/connection.rb:16:in stream' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/twitter-5.15.0/lib/twitter/streaming/client.rb:119:inrequest' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/twitter-5.15.0/lib/twitter/streaming/client.rb:92:in user' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/t-2.9.0/lib/t/stream.rb:146:intimeline' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:ininvoke_command' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in dispatch' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:ininvoke' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:235:in block in subcommand' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:inrun' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:indispatch' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/t-2.9.0/bin/t:20:in<top (required)>' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/bin/t:23:in load' from /Users/kamilkhan/.rvm/rubies/ruby-2.2.0/bin/t:23:in

' from /Users/kamilkhan/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in eval' from /Users/kamilkhan/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in
'

Using Mac OS X 10.11

synthmeat commented 9 years ago

Likewise for most streaming commands (all fails completely, timeline outputs but then crashes, ...).

$ t stream all
/usr/local/lib/ruby/gems/2.1/gems/twitter-5.15.0/lib/twitter/streaming/connection.rb:16:in `initialize': Can't assign requested address - connect(2) for "199.16.156.217" port  (Errno::EADDRNOTAVAIL)
        from /usr/local/lib/ruby/gems/2.1/gems/twitter-5.15.0/lib/twitter/streaming/connection.rb:16:in `new'
        from /usr/local/lib/ruby/gems/2.1/gems/twitter-5.15.0/lib/twitter/streaming/connection.rb:16:in `stream'
        from /usr/local/lib/ruby/gems/2.1/gems/twitter-5.15.0/lib/twitter/streaming/client.rb:119:in `request'
        from /usr/local/lib/ruby/gems/2.1/gems/twitter-5.15.0/lib/twitter/streaming/client.rb:58:in `sample'
        from /usr/local/lib/ruby/gems/2.1/gems/t-2.9.0/lib/t/stream.rb:43:in `all'
        from /usr/local/lib/ruby/gems/2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from /usr/local/lib/ruby/gems/2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from /usr/local/lib/ruby/gems/2.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        from /usr/local/lib/ruby/gems/2.1/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
        from /usr/local/lib/ruby/gems/2.1/gems/thor-0.19.1/lib/thor.rb:235:in `block in subcommand'
        from /usr/local/lib/ruby/gems/2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from /usr/local/lib/ruby/gems/2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from /usr/local/lib/ruby/gems/2.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        from /usr/local/lib/ruby/gems/2.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from /usr/local/lib/ruby/gems/2.1/gems/t-2.9.0/bin/t:20:in `<top (required)>'
        from /usr/local/bin/t:23:in `load'
        from /usr/local/bin/t:23:in `<main>'
ruby 2.1.6p336 (2015-04-13 revision 50298) [amd64-freebsd10]
ngscheurich commented 9 years ago

Changing to Ruby 2.1.2 before starting the stream allows me to skirt around this issue for the time being.

ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]

SteveEdson commented 9 years ago

Same issue with ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]

yildizib commented 9 years ago

same issue with ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15]

twitter-5.15.0/lib/twitter/streaming/connection.rb:16:in initialize': Can't assign requested address - connect(2) for "199.16.156.20" port (Errno::EADDRNOTAVAIL) from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/twitter-5.15.0/lib/twitter/streaming/connection.rb:16:innew' from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/twitter-5.15.0/lib/twitter/streaming/connection.rb:16:in stream' from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/twitter-5.15.0/lib/twitter/streaming/client.rb:119:inrequest' from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/twitter-5.15.0/lib/twitter/streaming/client.rb:37:in filter' from test.rb:12:in

'

larryhynes commented 8 years ago

...aaaand, with ruby 2.1.5. I just tried it with 2.2.3 as well, same issue. The issue appears to be with the twitter gem, as opposed to t specifically, but since we're all here and it's the same developer we might as well settle in and get cosy.

@sferik if you want any testing done against various ruby versions give me a shout, happy to help.

larryhynes commented 8 years ago

Ah. Here's the real issue. There's a fix documented here, it's a small change to lib/twitter/streaming/connection.rb.

pmarsceill commented 8 years ago

Ah. Here's the real issue. There's a fix documented here...

Thanks @larryhynes. This fix worked for me. :+1: