> On Aug 24, 2023, at 05:59, john via gnucash-user gnucash-user@gnucash.org > wrote: > > > On Aug 23, 2023, at 02:26, Jascha K via gnucash-user > > gnucash-user@gnucash.org wrote: > > > > Hi, > > > > I've been trying to get quotes via gnucash-cli with the following command: > > > > gnucash-cli --quotes get mysql://<connection-details> > > > > However, I get the following message when executing the command and no > > quotes are fetched: 'Price retrieval failed: GncQuotes::Fetch called with > > no commodities.' > > > > All of my quote sources are of type 'Unknown' (tradegate, fondsweb). > > > > When I get the quotes via 'Get Quotes' in the Price Database, the quotes > > are fetched normally, so it seems to be a problem with the CLI. > > > > After some investigation, I found out 2 things: > > > > 1. When switching the quote source for a security to a source that is not > > Unknown, the CLI is able to fetch that security's quote. > > > > 2. When I edit the file libgnucash/engine/gnc-commodity.c and add the > > tradegate and fondsweb sources to the 'single_quote_sources' variable (thus > > making them known sources), the CLI is able to fetch all quotes, no more > > errors. > > > > This leads me to believe that the CLI fetching ignores securities where the > > quote source is Unknown, whereas the GUI fetches the quotes regardless of > > the quote source. I was not able to pin down this behavior in the source, > > but maybe somebody can clarify whether this is the desired behavior for the > > CLI. > > > > Tested with most recent stable branch and Flatpak version 5.3, F::Q > > versions 1.54, 1.56 and 1.58, on Ubuntu 22.04. > > > Not desired behavior but not surprising either: In order to know about the > unknown quote source gnucash-cli -Q get needs to retrieve them from F::Q and > it doesn't do that. Shouldn't be too hard to fix, but please file a bug so > that the problem doesn't get lost in mailing list entropy. > > Regards, > John Ralls
Thanks for the explanation. The bug is filed: https://bugs.gnucash.org/show_bug.cgi?id=799066. _______________________________________________ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user ----- Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.