Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized value $age in numeric gt (>) #1

Closed
anoduck opened this issue Mar 24, 2016 · 2 comments
Closed

Uninitialized value $age in numeric gt (>) #1

anoduck opened this issue Mar 24, 2016 · 2 comments

Comments

@anoduck
Copy link

anoduck commented Mar 24, 2016

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.

@eddelbuettel
Copy link
Owner

The code may be correct and warn you of a price data point with an associated date that is old.

Check the security, and its data. You can do that eg via call yahooquote which calls the same data-gatherer Finance::YahooQuote which beancounter relies on.

edd@max:~$ yahooquote -v IBM
Symbol: IBM
Name: International Business Machines
Last: 145.40
Trade Date: 3/23/2016
Trade Time: 4:01pm
Change: -2.70
% Change: -1.82%
Volume: 4764321
Avg. Daily Volume: 5445230
Bid: 142.88
Ask: 146.84
Prev. Close: 148.10
Open: 148.00
Day's Range: 145.13 - 148.03
52-Week Range: 116.90 - 176.30
EPS: 13.42
P/E Ratio: 10.83
Div. Pay Date: 3/10/2016
Div/Share: 5.20
Div. Yield: 3.50
Mkt. Cap: 139.71B
Exchange: NYQ

edd@max:~$ 

@anoduck
Copy link
Author

anoduck commented Dec 12, 2016

Wow! wee! Thanks So much.

@anoduck anoduck closed this as completed Dec 12, 2016
@anoduck anoduck reopened this Dec 12, 2016
@anoduck anoduck closed this as completed Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants