fx update seems broken in beancounter

Bug #1066638 reported by Boyd Kelly
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
beancounter (Ubuntu)
New
Undecided
Unassigned

Bug Description

Trying out beancounter after a long absence. I can't update my fx with oanda or ubx.

oanda gives the following:
bkelly@x1 ~ $ beancounter fxbackpopulate --prevdate '50 days ago' IAU
$VAR1 = {
          'verbose' => '1',
          'equityupdate' => 1,
          'fxupdate' => '1',
          'lastbizday' => '20121014',
          'dbname' => 'portfolio.sqlite',
          'currency' => 'CAD',
          'debug' => '1',
          'user' => 'bkelly',
          'odbc' => 0,
          'host' => 'localhost',
          'passwd' => undef,
          'commit' => 1,
          'prevbizday' => '20120825',
          'today' => '20121014',
          'dbsystem' => 'sqlite',
          'dsn' => 'beancounter',
          'ubcfx' => 0
        };
Database has schema 0.8.7, we require version 0.6.0
   backpopulating IAU (rel. to CAD) from 20120825 to 20121014
Url is http://www.oanda.com/convert/fxhistory?lang=en&date1=08%2F25%2F2012&date=10%2F14%2F2012&date_fmt=us&exch=IAU&exch2=&expr=CAD&expr2=&margin_fixed=0&SUBMIT=Get+Table&format=CSV&redirected=1

But if enter the url directly in a browser it tells me:

Sorry, couldn't create table, because you entered incorrect dates
or the time period is too big (max. 500 days).

This is the case not matter what the time period.

ubcfx gives me the following url:

bkelly@x1 ~ $ beancounter fxbackpopulate --ubcfx --prevdate '50 days ago' IAU
$VAR1 = {
          'verbose' => '1',
          'equityupdate' => 1,
          'fxupdate' => '1',
          'lastbizday' => '20121014',
          'dbname' => 'portfolio.sqlite',
          'currency' => 'CAD',
          'debug' => '1',
          'user' => 'bkelly',
          'odbc' => 0,
          'host' => 'localhost',
          'passwd' => undef,
          'commit' => 1,
          'prevbizday' => '20120825',
          'today' => '20121014',
          'dbsystem' => 'sqlite',
          'dsn' => 'beancounter',
          'ubcfx' => 1
        };
Database has schema 0.8.7, we require version 0.6.0
Url is http://fx.sauder.ubc.ca/cgi/fxdata?b=CAD&ld=14&lm=10&ly=2012&fd=25&fm=08&fy=2012&daily&q=volume&f=csv&o=T.C&c=IAU
--> <HTML><head><title>Pacific Exchange Rate Service - Error</title>
Use of uninitialized value in print at /usr/share/perl5/Finance/BeanCounter.pm line 376.

With ubcfx it seems the url has the stock symbol instead of the currency symbol as the last paramter. If I change the url to:
 http://fx.sauder.ubc.ca/cgi/fxdata?b=CAD&ld=14&lm=10&ly=2012&fd=25&fm=08&fy=2012&daily&q=volume&f=csv&o=T.C&c=USD
then this will return a table in a browser.

Thanks if either of these options can be fixed!

bk

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.