estately / rets

A pure-ruby library for fetching data from RETS servers
https://github.com/estately/rets
127 stars 94 forks source link

TypeError: no implicit conversion of nil into String #74

Closed Siggs2000 closed 10 years ago

Siggs2000 commented 10 years ago

I'm getting the following error from the httpclient gem (I believe) lately when trying to run a query like the one below:

(GLVAR is weird. 144 is ListPrice and class '1' is Residential)

property = client.find :first, {search_type: 'Property', class: '1', query: '144=990000-1000000'}
TypeError: no implicit conversion of nil into String
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:803:in `initialize'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:803:in `new'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:803:in `create_socket'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:752:in `block in connect'
    from /Users/seth/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:91:in `block in timeout'
    from /Users/seth/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:101:in `call'
    from /Users/seth/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:101:in `timeout'
    from /Users/seth/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:127:in `timeout'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:751:in `connect'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:609:in `query'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:164:in `query'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/httpclient-2.3.4.1/lib/httpclient.rb:1083:in `do_get_block'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/httpclient-2.3.4.1/lib/httpclient.rb:887:in `block in do_request'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/httpclient-2.3.4.1/lib/httpclient.rb:981:in `protect_keep_alive_disconnected'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/httpclient-2.3.4.1/lib/httpclient.rb:886:in `do_request'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/httpclient-2.3.4.1/lib/httpclient.rb:774:in `request'
... 4 levels...
    from /Users/seth/.rvm/gems/ruby-2.1.1/bundler/gems/rets-90092ccbf806/lib/rets/http_client.rb:16:in `http_get'
    from /Users/seth/.rvm/gems/ruby-2.1.1/bundler/gems/rets-90092ccbf806/lib/rets/client.rb:321:in `http_get'
    from /Users/seth/.rvm/gems/ruby-2.1.1/bundler/gems/rets-90092ccbf806/lib/rets/client.rb:63:in `login'
    from /Users/seth/.rvm/gems/ruby-2.1.1/bundler/gems/rets-90092ccbf806/lib/rets/client.rb:281:in `capabilities'
    from /Users/seth/.rvm/gems/ruby-2.1.1/bundler/gems/rets-90092ccbf806/lib/rets/client.rb:285:in `capability_url'
    from /Users/seth/.rvm/gems/ruby-2.1.1/bundler/gems/rets-90092ccbf806/lib/rets/client.rb:132:in `find_every'
    from /Users/seth/.rvm/gems/ruby-2.1.1/bundler/gems/rets-90092ccbf806/lib/rets/client.rb:116:in `find_with_retries'
    from /Users/seth/.rvm/gems/ruby-2.1.1/bundler/gems/rets-90092ccbf806/lib/rets/client.rb:104:in `find'
    from (irb):19
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/railties-4.1.0/lib/rails/commands/console.rb:90:in `start'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/railties-4.1.0/lib/rails/commands/console.rb:9:in `start'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:69:in `console'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /Users/seth/.rvm/gems/ruby-2.1.1/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
Siggs2000 commented 10 years ago

Forgot to client.login