similar to: Mechanize::ResponseCodeError: 500

Displaying 20 results from an estimated 400 matches similar to: "Mechanize::ResponseCodeError: 500"

2010 Oct 20
2
Mechanize::ResponseCodeError: 500
Also, excuse me if my issue is a little bit application-specific. I need Mechanize to submit bunch of data from our server to an online reservation system. The url ishttp://hajres.iranair.com/haj/request.php" It works in my browser however, using mechanize following error appears: >> agent.get("http://hajres.iranair.com/haj/request.php") Net::HTTP::Get: /haj/request.php
2012 Aug 02
2
Handling HTTP 500 errors
Hey guys, How do you handle HTTP 500 errors with Mechanize? After researching the web I thought something like this would work: begin Mechanize.new.get(url_which_returns_500) rescue Net::HTTPInternalServerError puts "Life is awesome. Let''s move on" end Anyways, the code in the rescue block will never be executed. Can you guys help me out? Kenny
2007 Oct 05
3
basic_auth problem since 0.6.9
I have a site that I don''t think "returns" a basic_auth request, but is able to use basic_auth. In the past on 0.6.8, I could use the following code: require ''rubygems'' # gem ''mechanize'', ''=0.6.8'' require ''mechanize'' agent = WWW::Mechanize.new agent.basic_auth("username", "password")
2006 Sep 26
7
Interesting mechanize difficulty
I found an interesting page today that I was trying to script against. The server returns a 404 with content and the page just works normally in firefox despite the 404. Mechanize raises an exception on it though. I''m working on a test case now.
2006 Nov 07
5
mechanize: 400 Bad Request
Hello, when trying to access a certain HTML-frame, I get: "in `request'': Unhandled response (WWW::Mechanize::ResponseCodeError)" and the page returns: "400 Bad Request" * Why? * How to solve this? With browser, it works. In the logs below, I marked 4 lines with "***", where I see possible differences in the URI. But I don''t know, if this is
2007 Feb 07
15
https with certificates
I poked around the web a little and didn''t run across how to use https when it asks for certificate validation. I''m trying to connect to devices that don''t have valid certificates, and in this case, I don''t care if they are or not. So when I use my browser to ge to the site, firefox asks me to allow the certificate, then one other question, then I get the
2010 May 31
1
Testing?
Hi there, Just wanted to test to see if my messages are getting posted to the list?
2007 Jul 12
3
Basic_auth questions
How do you make get the page when using basic_auth? Below is code, I am getting a 401 error. I am not sure if the basic _auth comes before the agent.get. I will appreciate any help. require ''mechanize'' require ''logger'' agent = WWW::Mechanize.new {|a| a.log = Logger.new(STDERR) } page = agent.get(''https://brewx.qualcomm.com/developer'' )
2010 Sep 01
4
NoMethodError: undefined method `force_encoding' for "Conten
Hi everyone! Im trying to install mechanizer from http://github.com/tenderlove/mechanize. I`ve clone the project into /tmp folder. When I do rake inside the folder /tmp/mechanizer it gives me this error: mac159180:mechanize renatosis$ rake (in /private/tmp/mechanize) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w -Ilib:bin:test:. -e ''require "rubygems";
2010 Jun 03
3
issue submitting a form
Hi. Recently I started rebuilding my old Mechanize script, which I used to automatically log in to a certain site and retrieve files from it. Old version worked great, however, when I did the update it started complaining. Here''s the log of the error: /Users/lukastolyarov/.gem/ruby/1.8/gems/mechanize-1.0.0/lib/mechanize/form/field.rb:30:in `<=>'': undefined method
2009 Sep 25
0
WWW::Mechanize and Rails console not playing well
I can run this code just fine in irb, but when I run it in rails script/console, I get an error: >> res = agent.submit(search_form, search_form.buttons.first) ArgumentError: one hash required from /home/jwoods/NetBeansProjects/activista/vendor/rails/ actionmailer/lib/../../actionpack/lib/../../activesupport/lib/ active_support/core_ext/string/interpolation.rb:85:in `%''
2006 Sep 18
2
BUG: Possible issue with escaped hrefs
I noticed an interesting problem today when scripting against a web app. The application contained a link in it that used %20 instead of spaces. After running mechanize through the Charles debugging proxy I found that mechanize was converting %20 to %2520 (double escaping the %20). This appears to happen under both 0.5.4 and 0.6.0. Here''s a simple set of files that demonstrate
2007 May 23
4
Error when posting form
Trying to submit a form is resulting in the following error: >> page = agent.submit(f, f.buttons.first) query: "action=start&quick=Y&clientApp=0&clientID=MCO" Net::HTTP::Post: /dealerApply/controller.jsp using cookie: JSESSIONID=GJ4NCvGJDTlrvrKsLw17hZ3FnlXFdVkvB5hh1jLkHKcH4Tn27371!-538794652 request-header: accept-language => en-us,en;q0.5 request-header: connection
2006 Dec 07
6
Response To Form Submission Hanging
Hello, I am using Mechanize to post a form to a website. When I do this by hand in my browser the response takes about 35s to come back (it''s a long page full of tables and graphics). When I do this with Mechanize, the server starts to respond and then appears to hang. The obvious conclusion is that my code is wrong but I am reasonably sure that I haven''t altered it
2007 Sep 14
1
Unable to scrap gmail.com - EOFError: End of file reached
Hi all, I am so excited to use mechanize! It has opened a whole new world of projects for me :) I am trying to login into the Gmail.com server, as described in http://schf.uc.org/articles/2007/02/14/scraping-gmail-with-mechanize-and-hpricot but am running into a few issues... irb(main):010:0> page = agent.submit form EOFError: end of file reached from
2007 Sep 11
3
Production mode bug with ruby/amazon
Hi all, I''ve got an issue that only ever appears in production mode. I''ve got my app hooked up to amazon''s web service (ECS, using ruby/amazon from http://www.caliban.org/ruby/ruby-amazon.shtml). In the dev environment, everything''s peachy. But in production mode, after I''ve left the app up for a couple of hours (sometimes, minutes), I get an
2012 Jul 23
2
Mechanize::Agent#post_connect_hook response != Mechanize#parse response
I''m working through an idea for a db-backed cache for Mechanize#get(). The idea is to use a Mechanize::Agent#post_connect_hook to cached any fetch data, and create a subclass of Mechanize::Agent#get() that checks the cache before calling super. I want to store the un-parsed (raw) page in the db, and call Mechanize#parse when there''s a cache hit, something along these lines:
2011 Jan 18
2
how to get captcha image with mechanize ?
Hey, how to get captcha image with mechanize ? the image is not a static picture, it''s a stream, a text-model. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/mechanize-users/attachments/20110118/bf9a58ff/attachment.html>
2008 Jan 16
3
settings headers in mechanize
hi, a potential mechanize user here. i''ve looked at the API but it''s not clear what capacity there is to arbitrarily set the headers - does mechanize allow for this? mechanize is clearly great for web browsing, but i also need to construct get and post requests from scratch. i''ve looked at net:http, libcurl, openuri, but mechanize seems simpler and more functional than
2008 Mar 11
8
Mechanize#get vs Mechanize#fetch_page
So I found myself wanting to call Mechanize#get with a hash for arguments like this: WWW::Mechanize.new(''http://api.flickr.com/services/rest/'', {:method => ''flickr.auth.getFrob''... }) Granted, it looks like this isn''t supported but it led me to what looks like a bug. Namely that get calls fetch_page(abs_uri, request, cur_page, &block)