Kevin Kornemann
2013-02-25 23:55:16 UTC
Got a form, hitting a button with Mechanize. Thus far have been going
through login steps quite nicely so I know my Mechanize basics are up to
snuff.
Then I get:
URI::InvalidURIError: bad URI(is not URI?):
CBMenu.jsp;jsessionid=0000FWXUFvwFz8oQcES43L6CCz1:-1
from
/Users/kevin/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/uri/common.rb:176:in
`split'
from
/Users/kevin/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/uri/common.rb:211:in
`parse'
from
/Users/kevin/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/uri/common.rb:747:in
`parse'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/mechanize-2.5.1/lib/mechanize/http/agent.rb:621:in
`rescue in resolve'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/mechanize-2.5.1/lib/mechanize/http/agent.rb:618:in
`resolve'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/mechanize-2.5.1/lib/mechanize/http/agent.rb:214:in
`fetch'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/mechanize-2.5.1/lib/mechanize.rb:1229:in
`post_form'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/mechanize-2.5.1/lib/mechanize.rb:515:in
`submit'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/mechanize-2.5.1/lib/mechanize/form.rb:178:in
`submit'
from (irb):69
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/railties-3.2.12/lib/rails/commands/console.rb:47:in
`start'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/railties-3.2.12/lib/rails/commands/console.rb:8:in
`start'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/railties-3.2.12/lib/rails/commands.rb:41:in
`<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Any way of ignoring these weird characters and continuing? Anyway of fixing
this?
Best,
Kevin
through login steps quite nicely so I know my Mechanize basics are up to
snuff.
Then I get:
URI::InvalidURIError: bad URI(is not URI?):
CBMenu.jsp;jsessionid=0000FWXUFvwFz8oQcES43L6CCz1:-1
from
/Users/kevin/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/uri/common.rb:176:in
`split'
from
/Users/kevin/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/uri/common.rb:211:in
`parse'
from
/Users/kevin/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/uri/common.rb:747:in
`parse'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/mechanize-2.5.1/lib/mechanize/http/agent.rb:621:in
`rescue in resolve'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/mechanize-2.5.1/lib/mechanize/http/agent.rb:618:in
`resolve'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/mechanize-2.5.1/lib/mechanize/http/agent.rb:214:in
`fetch'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/mechanize-2.5.1/lib/mechanize.rb:1229:in
`post_form'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/mechanize-2.5.1/lib/mechanize.rb:515:in
`submit'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/mechanize-2.5.1/lib/mechanize/form.rb:178:in
`submit'
from (irb):69
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/railties-3.2.12/lib/rails/commands/console.rb:47:in
`start'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/railties-3.2.12/lib/rails/commands/console.rb:8:in
`start'
from /Users/kevin/.rvm/gems/ruby-1.9.3-***@texas/gems/railties-3.2.12/lib/rails/commands.rb:41:in
`<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
From the googling I've done, seems to be related to an invalid character in
the re-direct, but really I have no idea...Any way of ignoring these weird characters and continuing? Anyway of fixing
this?
Best,
Kevin