eddelbuettel / beancounter Goto Github PK
View Code? Open in Web Editor NEWStock Portfolio Performance Tool
Stock Portfolio Performance Tool
I really hate being the bearer of bad news, but just recently been getting a rather annoying error message:
Use of uninitialized value $age in numeric gt (>) at /usr/local/share/perl/5.20.2/Finance/BeanCounter.pm line 1743.
Things are still working, but it is annoying. Line 1743 simply states:
if ($age > 5) {
The full expression is:
if ($age > 5) { warn "Ignoring $hash{$key}{symbol} ($hash{$key}{name}) " . "with old date $hash{$key}{date}\n"; #warn "Ignoring $hash{$key}{name} with old date $hash{$key}{date}\n"; #if $Config{debug}; $hash{$key}{date} = "N/A"; next; }
I am no whiz with perl, but I do believe there is a simple fix for this somewhere. Thanks for writing such a kickass program. Beers on me, if we ever meet. Cheers.
Since making the transition from Linux to OpenBSD I have not been successful at setting up beancounter. I know this is rock solid code, but for some reason regardless of which database I use, I get the same error.
Use of uninitialized value in die at /usr/local/libdata/perl5/site_perl/Finance/BeanCounter.pm line 144.
Died at /usr/local/libdata/perl5/site_perl/Finance/BeanCounter.pm line 144.
The section that contains line 144, is part of beancounter's database test to see if the database is configured correctly. The line of code does not look like one I can just comment out something, and go on my way. I am not sure why my system is not defining that particular variable.
The block of code in question is:
sub TestInsufficientDatabaseSchema($$) {
my ($dbh, $required) = @_;
my @tables = $dbh->tables();
die "Database does not contain table beancounter. " .
"Please run 'update_beancounter'.\n" unless grep /beancounter/, @tables;
my $sql = q{select version from beancounter};
my @res = $dbh->selectrow_array($sql) or die $dbh->errstr;
my $dbschema = $res[0];
my $num_required = ConvertVersionToLargeInteger($required);
my $num_schema = ConvertVersionToLargeInteger($dbschema);
print "Database has schema $dbschema, we require version $required\n"
if $Config{debug};
return ($num_schema < $num_required); # extensive testing was required =:-)
}
What am I doing wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.