GNOME Bugzilla – Bug 742625
--add-price-quotes unknown error
Last modified: 2018-06-29 23:37:34 UTC
Created attachment 294134 [details] See the last line on the trace for error I have installed and working (finally) the Finance::Quote module on Windows and Gnucash 2.6.5. I have checked the module using the gnc-* commands and apparently works fine: C:\Program Files\gnucash\bin>perl gnc-fq-dump yahoo AMXL.MX CSCO Finance::Quote fields Gnucash uses: symbol: AMXL.MX <=== required date: 01/08/2015 <=== required currency: MXN <=== required last: 16.450 <=\ nav: <=== one of these price: 16.450 <=/ timezone: <=== optional ===== Finance::Quote fields Gnucash uses: symbol: CSCO <=== required date: 01/08/2015 <=== required currency: USD <=== required last: 27.51 <=\ nav: <=== one of these price: 27.51 <=/ timezone: <=== optional So, when I type the --add-price-quotes in order to get the updated prices I get and unknown error (in spanish: WARN <gnc.scm> Error desconocido al obtener las cotizaciones.) I'm not sure about the correct from source, maybe "Unknown error getting prices". I reproduced in two differents systems Windows 7 and Windows 8.1, with different perl distributions: ActivePerl and Strawberry Perl, respectively. I will test it on Ubuntu Linux. I attached the trace with --debug --extra. In both systems is not so easy install the Finance:Quote module, too. Thank you. I hope this can help.
On Ubuntu linux 14.10 version of Gnucash, I discovered that with two or more malformed or unrecognized stock symbols (e.g. COMERCIUBC.MX, ACTINVRB .MX) the unknown error appear. I this case, I don't know why COMERCIUBC.MX is not recognized by Finance::Quote, you can see it normally in yahoo finance site. On the other hand, in ACTINVRB .MX in linux version show an unknown character between B and .MX. But, when allow just one of the bad stock symbols, the unknown error does not appear. When I rewrite the symbol for ACTINVRB.MX the error disappear. I make that disappear in Windows versions too. Probably would be necessary a filter for malformed symbols. I hope I'm not hurried when I genereted this bug. Sorry for inconveniences.
I am wondering about your trace file. If I run gnucash --debug --extra --add-price-quotes=<path/to/my/file> with online quotes enabled for some outdated commodities, I get in my trace file a section * 19:45:46 WARN <gnc.scm> Unable to retrieve quotes for these items: <Namespace>:<Symbol> : Continuing with good quotes. > Probably would be necessary a filter for malformed symbols. Remember, F:Q does not only support yahoo, but many sources. Perhaps the next implemented source would use indic or chinese symbols. So we should not restrict to ascii symbols. Finally the user is still responsible for her input.
This is a bug, though it's a duplicate and "malformed symbol" is different from "symbol not found". There are two problems: Some error conditions from F::Q aren't handled well and produce a generic error message that doesn't help the user fix them problem, and when that happens the whole F::Q session is rejected so that the user can't get quotes for anything else. I agree that it's futile to try to filter the symbols ahead of time. We just need better exception handling. *** This bug has been marked as a duplicate of bug 667928 ***
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=742625. Please update any external references or bookmarks.