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

wrong number of arguments #178

Closed
alexohneander opened this issue Jul 31, 2015 · 11 comments
Closed

wrong number of arguments #178

alexohneander opened this issue Jul 31, 2015 · 11 comments

Comments

@alexohneander
Copy link

Specs: MacOSX 10.10

After i enter the pin i got these error:

 /Users/User/.rvm/gems/ruby-2.1.5/gems/eventmachine-1.0.7/lib/em/buftok.rb:15:in `initialize': wrong number of arguments (2 for 0..1) (ArgumentError)
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:206:in `new'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:206:in `reset_state'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:140:in `post_init'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/eventmachine-1.0.7/lib/em/connection.rb:58:in `block in new'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/eventmachine-1.0.7/lib/em/connection.rb:49:in `instance_eval'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/eventmachine-1.0.7/lib/em/connection.rb:49:in `new'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/eventmachine-1.0.7/lib/eventmachine.rb:679:in `bind_connect'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/eventmachine-1.0.7/lib/eventmachine.rb:649:in `connect'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:65:in `connect'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/earthquake-1.0.2/lib/earthquake/core.rb:178:in `start_stream'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/earthquake-1.0.2/lib/earthquake/core.rb:163:in `reconnect'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/earthquake-1.0.2/lib/earthquake/core.rb:155:in `block in start'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `call'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/earthquake-1.0.2/lib/earthquake/core.rb:130:in `start'
    from /Users/User/.rvm/gems/ruby-2.1.5/gems/earthquake-1.0.2/bin/earthquake:39:in `<top (required)>'
    from /Users/User/.rvm/gems/ruby-2.1.5/bin/earthquake:23:in `load'
@veracosta
Copy link

Same issue here. I've got following error messages on Ubuntu 14.10.

? /home/foo/.rvm/gems/ruby-2.1.4/gems/eventmachine-1.0.7/lib/em/buftok.rb:15:in `initialize': wrong number of arguments (2 for 0..1) (ArgumentError)
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:206:in `new'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:206:in `reset_state'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:140:in `post_init'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/eventmachine-1.0.7/lib/em/connection.rb:58:in `block in new'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/eventmachine-1.0.7/lib/em/connection.rb:49:in `instance_eval'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/eventmachine-1.0.7/lib/em/connection.rb:49:in `new'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/eventmachine-1.0.7/lib/eventmachine.rb:679:in `bind_connect'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/eventmachine-1.0.7/lib/eventmachine.rb:649:in `connect'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:65:in `connect'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/earthquake-1.0.2/lib/earthquake/core.rb:178:in `start_stream'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/earthquake-1.0.2/lib/earthquake/core.rb:163:in `reconnect'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/earthquake-1.0.2/lib/earthquake/core.rb:155:in `block in start'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `call'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/earthquake-1.0.2/lib/earthquake/core.rb:130:in `start'
        from /home/foo/.rvm/gems/ruby-2.1.4/gems/earthquake-1.0.2/bin/earthquake:39:in `<top (required)>'
        from /home/foo/.rvm/gems/ruby-2.1.4/bin/earthquake:23:in `load'
        from /home/foo/.rvm/gems/ruby-2.1.4/bin/earthquake:23:in `<main>'
        from /home/foo/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval'
        from /home/foo/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>'

@sachin21
Copy link

sachin21 commented Oct 6, 2015

I also same error has occurred.
Environments:
OSX: 10.10.5
Ruby: ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin14.0]
earthquake: v1.0.2

Stack trace:

⚡ /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.8/lib/em/buftok.rb:15:in `initialize': wrong number of arguments (2 for 0..1) (ArgumentError)
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:206:in `new'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:206:in `reset_state'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:140:in `post_init'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.8/lib/em/connection.rb:58:in `block in new'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.8/lib/em/connection.rb:49:in `instance_eval'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.8/lib/em/connection.rb:49:in `new'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.8/lib/eventmachine.rb:687:in `bind_connect'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.8/lib/eventmachine.rb:657:in `connect'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:65:in `connect'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:178:in `start_stream'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:163:in `reconnect'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:155:in `block in start'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.8/lib/eventmachine.rb:193:in `call'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.8/lib/eventmachine.rb:193:in `run_machine'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/eventmachine-1.0.8/lib/eventmachine.rb:193:in `run'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:130:in `start'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/earthquake-1.0.2/bin/earthquake:39:in `<top (required)>'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/bin/earthquake:23:in `load'
        from /Users/sachin21dev/.rbenv/versions/2.1.2/bin/earthquake:23:in `<main>'

@soimort
Copy link

soimort commented Dec 23, 2015

Same here, on Arch Linux, RVM with ruby-2.2.1.

Related issue: voloko/twitter-stream#43

~  earthquake
                 _   _                       _
  ___  __ _ _ __| |_| |__   __ _ _   _  __ _| | _____
 / _ \/ _` | '__| __| '_ \ / _` | | | |/ _` | |/ / _ \
|  __/ (_| | |  | |_| | | | (_| | |_| | (_| |   <  __/
 \___|\__,_|_|   \__|_| |_|\__, |\__,_|\__,_|_|\_\___|
                              |_|               v1.0.2

/home/soimort/.rvm/gems/ruby-2.2.1/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:27: warning: duplicated key at line 30 ignored: :path
⚡ /home/soimort/.rvm/gems/ruby-2.2.1/gems/eventmachine-1.0.8/lib/em/buftok.rb:15:in `initialize': wrong number of arguments (2 for 0..1) (ArgumentError)
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:206:in `new'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:206:in `reset_state'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:140:in `post_init'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/eventmachine-1.0.8/lib/em/connection.rb:58:in `block in new'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/eventmachine-1.0.8/lib/em/connection.rb:49:in `instance_eval'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/eventmachine-1.0.8/lib/em/connection.rb:49:in `new'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/eventmachine-1.0.8/lib/eventmachine.rb:687:in `bind_connect'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/eventmachine-1.0.8/lib/eventmachine.rb:657:in `connect'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:65:in `connect'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/earthquake-1.0.2/lib/earthquake/core.rb:178:in `start_stream'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/earthquake-1.0.2/lib/earthquake/core.rb:163:in `reconnect'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/earthquake-1.0.2/lib/earthquake/core.rb:155:in `block in start'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/eventmachine-1.0.8/lib/eventmachine.rb:193:in `call'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/eventmachine-1.0.8/lib/eventmachine.rb:193:in `run_machine'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/eventmachine-1.0.8/lib/eventmachine.rb:193:in `run'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/earthquake-1.0.2/lib/earthquake/core.rb:130:in `start'
    from /home/soimort/.rvm/gems/ruby-2.2.1/gems/earthquake-1.0.2/bin/earthquake:39:in `<top (required)>'
    from /home/soimort/.rvm/gems/ruby-2.2.1/bin/earthquake:23:in `load'
    from /home/soimort/.rvm/gems/ruby-2.2.1/bin/earthquake:23:in `<main>'
    from /home/soimort/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
    from /home/soimort/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'

@cirrusUK
Copy link

Damn this been open since july with no fix/workarounds, dont know what i'll do without my fave client

same here on archlinux since ruby 2.3.0
_cirrus_minor_⚡ /home/cirrus/.gem/ruby/2.3.0/gems/eventmachine-1.0.8/lib/em/buftok.rb:15:in initialize': wrong number of arguments (given [5/292] cted 0..1) (ArgumentError) from /home/cirrus/.gem/ruby/2.3.0/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:206:innew'
from /home/cirrus/.gem/ruby/2.3.0/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:206:in reset_state' from /home/cirrus/.gem/ruby/2.3.0/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:140:inpost_init'
from /home/cirrus/.gem/ruby/2.3.0/gems/eventmachine-1.0.8/lib/em/connection.rb:58:in block in new' from /home/cirrus/.gem/ruby/2.3.0/gems/eventmachine-1.0.8/lib/em/connection.rb:49:ininstance_eval'
from /home/cirrus/.gem/ruby/2.3.0/gems/eventmachine-1.0.8/lib/em/connection.rb:49:in new' from /home/cirrus/.gem/ruby/2.3.0/gems/eventmachine-1.0.8/lib/eventmachine.rb:687:inbind_connect'
from /home/cirrus/.gem/ruby/2.3.0/gems/eventmachine-1.0.8/lib/eventmachine.rb:657:in connect' from /home/cirrus/.gem/ruby/2.3.0/gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb:65:inconnect'
from /home/cirrus/.gem/ruby/2.3.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:178:in start_stream' from /home/cirrus/.gem/ruby/2.3.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:163:inreconnect'
from /home/cirrus/.gem/ruby/2.3.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:155:in block in start' from /home/cirrus/.gem/ruby/2.3.0/gems/eventmachine-1.0.8/lib/eventmachine.rb:193:inrun_machine'
from /home/cirrus/.gem/ruby/2.3.0/gems/eventmachine-1.0.8/lib/eventmachine.rb:193:in run' from /home/cirrus/.gem/ruby/2.3.0/gems/earthquake-1.0.2/lib/earthquake/core.rb:130:instart'

@cirrusUK
Copy link

@soimort comment out line 30 of gems/twitter-stream-0.1.16/lib/twitter/json_stream.rb will fix the issue you are having, which is different from the 'wrong number of arguments' error in this thread. See #169 for more info. Good Luck.

@cirrusUK
Copy link

fixed it by editing /home/cirrus/.gem/ruby/2.3.0/gems/eventmachine-1.0.8/lib/em/buftok.rb
line 15
" - def initialize(delimiter = $/) "
"+ def initialize(delimiter = "\n", size_limit = nil) "

@soimort
Copy link

soimort commented Dec 31, 2015

@cirrusUK Unfortunately not. It's exactly the same wrong number of arguments error, nothing to do with the issue you just mentioned in #169.

Update: voloko/twitter-stream#45 could do the trick. Someone should really merge that PR and update the twitter-stream gem.

@cirrusUK
Copy link

@soimort sorry my bad, i stopped reading after first error on your post, my fix has been working now for last 20 minutes :)

@soimort
Copy link

soimort commented Dec 31, 2015

@cirrusUK Yes, a reverting patch to eventmachine should be just fine, if getting this gem work is all that you need. However, if you have other working code / gem which relies on the eventmachine ~> 1.0.7 API, they might break unexpectedly =)

@cirrusUK
Copy link

@soimort yes indeed, thankfully i only use ayadn & earthquake gems so im just happy it works for me and i wont have to give up on my fave twitter client.

@bronikowski
Copy link

I can +1 this, a reason why I had to dump earthquake in favor of rainbowstream.

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

6 participants