Ticket #33 (closed defect: fixed)

Opened 21 months ago

Last modified 21 months ago

Error in parse.rb opening url

Reported by: mcroeder Owned by: why
Priority: minor Milestone: 0.5
Component: lib/hpricot Version: 0.4
Keywords: parse.rb nil into string Cc:

Description

I'm getting an error in version 0.4.59 and 0.4.76 that I haven't seen in earlier (0.4) versions when parsing a url returned from open_uri:

open_uri = open(some_url) Hpricot(open_uri)

where some_url = http://search.yahooapis.com/WebSearchService/V1/webSearch?appid=channel_search_app_id&results=50&start=151&type=all&query=+%22Enterprise%20Risk%20Management%22%20+%22ERM%22%20+%22Energy%22

The stack trace is: (TypeError?) - cannot convert nil into String TRACE: c:/program files/ruby/lib/ruby/gems/1.8/gems/hpricot-0.4.59-mswin32/lib/hpricot/parse.rb:258:in `+' c:/program files/ruby/lib/ruby/gems/1.8/gems/hpricot-0.4.59-mswin32/lib/hpricot/parse.rb:258:in `parse' c:/program files/ruby/lib/ruby/gems/1.8/gems/hpricot-0.4.59-mswin32/lib/hpricot/parse.rb:171:in `build_node' c:/program files/ruby/lib/ruby/gems/1.8/gems/hpricot-0.4.59-mswin32/lib/hpricot/parse.rb:137:in `make' c:/program files/ruby/lib/ruby/gems/1.8/gems/hpricot-0.4.59-mswin32/lib/hpricot/parse.rb:137:in `map' c:/program files/ruby/lib/ruby/gems/1.8/gems/hpricot-0.4.59-mswin32/lib/hpricot/parse.rb:137:in `make'

For reference, this is the windows version.

Change History

Changed 21 months ago by why

  • status changed from new to closed
  • version set to 0.4
  • resolution set to fixed
  • milestone set to 0.5

Try the latest gem (0.4.86):

 gem install hpricot --source code.whytheluckystiff.net

That page parses fine for me with that version. It's a stable version. 0.5 will be out soon.

Note: See TracTickets for help on using tickets.