Gnucash not able to retrieve currency quotes

Of February 2012, gnucash stopped returning currency conversions. If you get the error that says “Unable to retrieve quotes” for any currency, you have to make changes to the Quote.pm file on your computer. This is due to changes made by Yahoo, which have broken Finance::Quotes currency retrieval.

Follow the instructions below to fix your problem:
# cd /usr/share/perl5/vendor_perl/Finance <enter>
# cp Quote.pm Quote.orig <enter>
# gedit Quote.pm <enter>

Go to line 246 and make the following changes.
Remove the lines as shown below in red and replace with those shown in blue:
  # Find the <div> with the data
  my $div = $tb->look_down(‘id’,’yfi_quote_summary_data’);
  # Make sure there’s a <div> to parse.
  return undef unless $div;

  # The first <b> should contain the quote
  my $rate_element=$div->look_down(‘_tag’,’b’);
  # Make sure there’s a <b> to parse.
  return undef unless $rate_element;

  my $exchange_rate=$rate_element->as_text;

Replace them with the lines shown in blue below:
  # Find the <div> with the data
  my $div = $tb->look_down(‘id’,’yfi_investing_content’);
  # Make sure there’s a <div> to parse.
  return undef unless $div;

  # Find the <span> that contains the quote
  my $lcfrom = lc($from);
  my $lcto = lc($to);
  my $rate_element=$div->look_down(‘id’, “yfs_l10_$lcfrom$lcto=x”);
  # Make sure there’s a <span> to parse.
  return undef unless $rate_element;

  my $exchange_rate=$rate_element->as_text;

You can copy and paste the above lines. I followed the instructions at this link https://rt.cpan.org/Public/Bug/Display.html?id=74660#txn-1038090 at the Finance::Quotes site. If you know how to apply the patch using the patch command, go ahead and do it. Saves the typing effort!