Comments (9)
We've rewritten the F::Q interaction for GnuCash 5, which we'll release next spring, to collect and report a lot more error state from F::Q, including errormsg
.
from finance-quote.
@jayenashar Not having used GnuCash 5.x myself yet, I believe this is now in place. So unless there is an objection, I will close this issue in the next few days.
Thank you.
from finance-quote.
Actually I misspoke earlier today, but I did find a bug in the code. The quote hash for each security can include an "errormsg" key value. Many of the methods don't populate it and the logic in Alphavantage.pm skips populating it when an "Information" key value pair is returned. The conversation I remember was a contributor wanting to be able to control printing the message to stdout or stderr based on a flag passed by environment variable or other means. A quick PoC gives me this.
use Finance::Quote;
my $q = Finance::Quote->new('alphavantage' => {API_KEY => 'demo'});
%quotes = $q->fetch("alphavantage", "F");
print "The price of Ford is " . $quotes{"F", "last"} . "\n";
if ( defined($quotes{"F","errormsg"}) ) {
print "Errormsg: " . $quotes{"F","errormsg"} . "\n";
}
Running it returns:
The price of Ford is
Errormsg: The **demo** API key is for demo purposes only. Please claim your free API key at (https://www.alphavantage.co/support/#api-key) to explore our full API offerings. It takes fewer than 20 seconds.
Change 'demo' in the code to a valid API Key and the price is valid but no error message is shown. Is this inline with what you are looking for?
from finance-quote.
sorry, i don't know. i'm just trying to improve the user experience of the average gnucash user. if you do print based on errormsg
then you need @jrails or someone from gnucash to pick it up and present it to the user.
from finance-quote.
I'd have to ask, but I think they are aware of "errormsg" being a possible part of the quote hash passed back to GnuCash.
from finance-quote.
You may have seen my post to the gnucash-devel mailing list. Waiting for a response.
from finance-quote.
I didn't see it so thanks for letting me know.
from finance-quote.
No one responded to my list email. So I created a bugs.gnucash.org account and posted my email to https://bugs.gnucash.org/show_bug.cgi?id=798466.
from finance-quote.
thanks for your persistence
from finance-quote.
Related Issues (20)
- YahooJSON not setting Exchange Correctly
- Finance Quote 1.56 - Crashing Gnucash / Error for Gnucash v5+ HOT 2
- Add CONTRIBUTING.md
- Change URL used by YahooWeb
- YahooJSON does not work for some shares HOT 9
- Documentation Housekeeping
- YahooJson returning 404 not found HOT 4
- YahooWeb Returning Bad Price
- Bloomberg Returning Parse Error HOT 6
- quotes install fails: `t/exit_with_message.t ... Use of uninitialized value $err in pattern match` HOT 6
- Finance::Quote is intentionally leaking information about its users to a third-party server HOT 2
- Update to add Yahoo cookies and crumbs for Yahoo JSON. HOT 10
- BSEIndia.pm inserts extra string into return value on retrieval failure HOT 1
- TSP.pm
- TSP module downloading in ordinate amount of data HOT 2
- FTfunds possibly rejecting funds that have a colon in the symbol/code HOT 4
- Fidelity.pm Not Working HOT 4
- `XETRA.pm` no longer working HOT 4
- Get Quotes Throws Error HOT 3
- GoogleWeb.pm does not support BATS exchange HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from finance-quote.