Rahul Thathoo
2010-Oct-06 23:33 UTC
[Mechanize-users] can you mechanize.get(''http://www.sephora.com/browse/product.jhtml?id=P230234'') without error?
hey guys,
i cant seem to mechanize.get(''
http://www.sephora.com/browse/product.jhtml?id=P230234''), it errors out
as:
/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize/chain/response_header_handler.rb:32:in
`handle'': invalid byte sequence in UTF-8 (ArgumentError)
from
/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize/chain.rb:30:in
`pass''
from
/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize/chain/handler.rb:6:in
`handle''
from
/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize/chain/response_body_parser.rb:35:in
`handle''
from
/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize/chain.rb:30:in
`pass''
from
/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize/chain/handler.rb:6:in
`handle''
from
/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize/chain/pre_connect_hook.rb:14:in
`handle''
from
/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize/chain.rb:25:in
`handle''
from
/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize.rb:506:in
`fetch_page''
from
/usr/local/lib/ruby/gems/1.9.1/gems/mechanize-0.9.2/lib/www/mechanize.rb:234:in
`get''
from del.rb:15:in `<main>''
and line 32 on response_header_handler.rb is: if page.is_a?(Page) &&
page.body =~ /Set-Cookie/n
i am on ruby 1.9 and mechanize-0.9.2 obviously... any ideas here? changing
page.body.include?(''Set-Cookie'') works...
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/mechanize-users/attachments/20101006/d71fe36b/attachment.html>
