As it should never have occurred, and should not be a warning, it is a (low 
priority) bug report, not an enhancement.  Assume everything is good but 
validate inputs before using, leads to simpler, cleaner code.  The code should 
complain about the key when it has occasion to use it, not as a warning, but as 
an error.  If it has occasion to use it 30 times, 30 errors until the user 
configures it correctly.


-----Original Message-----
From: Geert Janssens <geert.gnuc...@kobaltwit.be>
To: m.muruganan...@hotmail.com <m.muruganan...@hotmail.com>; hell...@gmail.com 
<hell...@gmail.com>; gnucash-user@gnucash.org <gnucash-user@gnucash.org>
Cc: David G. Pickett <dgpick...@aol.com>
Sent: Sun, Apr 9, 2023 5:31 am
Subject: Re: [GNC] Command line quotes still not fixed

What you get is not an error but a warning. In your case it's superfluous 
because as you say you don't have currency rate quotes. So it adds some noise 
for you but should otherwise work (barring the other bugs we're fixing in the 
online quote retrieval area).
However for users that would have currency quotes but omitted to set an 
AlphaVantage key, not getting the warning would leave them puzzled.
I agree it's currently a bit of an all-or-nothing approach but that can be 
refined eventually. A good improvement would be to check whether currency 
quotes are requested and only then emit a warning for a missing AlphaVantage 
API key.
That would be an enhancement request for you to file though.
Regards,
Geert
Op zondag 9 april 2023 01:50:55 CEST schreef David G. Pickett via 
gnucash-user:> I have no currency rate quotes, just US stocks in US dollars.> > 
> -----Original Message-----> From: Murugan Muruganandam 
<m.muruganan...@hotmail.com>> To: hell...@gmail.com <hell...@gmail.com>; David 
G. Pickett> <dgpick...@aol.com> Cc: gnucash-user@gnucash.org 
<gnucash-user@gnucash.org>> Sent: Thu, Apr 6, 2023 5:08 pm> Subject: Re: [GNC] 
Command line quotes still not fixed> > #yiv0949692185 P 
{margin-top:0;margin-bottom:0;}Alphavantage is required for> currency rates> > 
> Saludos Cordiales> Murugan> From: gnucash-user> 
<gnucash-user-bounces+m.muruganandam=hotmail....@gnucash.org> on behalf of> 
David G. Pickett via gnucash-user <gnucash-user@gnucash.org> Sent:> Thursday, 
April 6, 2023 4:41 PM> To: hell...@gmail.com <hell...@gmail.com>> Cc: 
gnucash-user@gnucash.org <gnucash-user@gnucash.org>> Subject: Re: [GNC] Command 
line quotes still not fixed As I do not use> Alphavantage, just 'Yahoo as 
json', why is it looking for an api key?> > > -----Original Message-----> From: 
David H <hell...@gmail.com>> To: David G. Pickett <dgpick...@aol.com>> Cc: 
geert.gnuc...@kobaltwit.be <geert.gnuc...@kobaltwit.be>;> 
gnucash-user@gnucash.org <gnucash-user@gnucash.org>; jra...@ceridwen.us> 
<jra...@ceridwen.us> Sent: Thu, Apr 6, 2023 4:21 pm> Subject: Re: [GNC] Command 
line quotes still not fixed> > I don't think the version difference is a 
mystery - remember that Flatpak is> a sandbox so presumably brings along 
whatever perl version it was> built/packaged with.  If you set your 
Alphavantage api key in the Gnucash> application itself you'll probably also 
also get rid of the other error> message. The following is all I get displayed 
using Geert's command format:> flatpak run --command=gnucash-cli 
org.gnucash.GnuCash --quotes get --> '/home/h/Documents/GnuCash/Data 
Files/h.gnucash' Found Finance::Quote> version 1.5301.> > Cheers David H.> > On 
Fri, 7 Apr 2023 at 05:08, David G. Pickett <dgpick...@aol.com> wrote:> > I 
don't understand why, but "--" does also work, like "--namespace='.*'".> > I 
still get a lot of errors that do not affect my quote fetch.> It finds 1.5301 
even though I installed 1.5401, a different mystery!> > dgp@dgp-p6803w:~$ 
flatpak run --command=gnucash-cli org.gnucash.GnuCash> --quotes get -- 
/home/dgp/GnuCash/ubuntu-DGPickett.gnucash* 15:05:17  WARN> <gnc.price-quotes> 
[GncFQQuoteSource::GncFQQuoteSource()] No Alpha Vantage> API key set, currency 
quotes and other AlphaVantage based quotes won't> work.Found Finance::Quote 
version 1.5301.dgp@dgp-p6803w:~$ flatpak run> --command=gnucash-cli 
org.gnucash.GnuCash --quotes get --namespace='.*'> 
/home/dgp/GnuCash/ubuntu-DGPickett.gnucash* 15:05:57  WARN> <gnc.price-quotes> 
[GncFQQuoteSource::GncFQQuoteSource()] No Alpha Vantage> API key set, currency 
quotes and other AlphaVantage based quotes won't> work.Found Finance::Quote 
version 1.5301.dgp@dgp-p6803w:~$  -----Original> Message-----> From: Geert 
Janssens <geert.gnuc...@kobaltwit.be>> To: David H <hell...@gmail.com>; 
gnucash-user@gnucash.org> <gnucash-user@gnucash.org> Cc: David G. Pickett 
<dgpick...@aol.com>; john> <jra...@ceridwen.us> Sent: Thu, Apr 6, 2023 3:47 am> 
Subject: Re: [GNC] Command line quotes still not fixed> > Actually instead of 
adding a --namespace parameter, you can just use '--' to> separate the named 
parameters from the positional parameters like> so:flatpak run 
--command=gnucash-cli org.gnucash.GnuCash --quotes get --> 
/home/dgp/GnuCash/ubuntu-DGPickett.gnucash That's a common unix way to> solve 
such ambiquities.> Regards,> Geert> Op donderdag 6 april 2023 05:04:02 CEST 
schreef john:> The namespace> parameter is a regular expression, so .* will get 
the quotes> from all of> your namespaces.> > Regards,> John Ralls> > > On Apr 
5, 2023, at 3:46 PM,> David H <hell...@gmail.com> wrote:> > > > What default 
namespace, look in> YOUR security editor - as far as> > I know it's whatever 
you set up.  I> have a vague recollection that it> > doesn't really care and 
will be happy> with just a single character> > i.e. --namespace=x> > but don't 
quote me on> that.> > > > By the way your original email could do with some 
halfway> decent> > formatting> > - see what the mailing list received at>> 
>https://lists.gnucash.org/pipermail/gnucash-user/2023-April/106230.html> >> 
you> > might like to tweak that to make it readable in future.> > > >> Cheers 
David H.> > > > On Thu, 6 Apr 2023 at 07:46, David G. Pickett> 
<dgpick...@aol.com> wrote:> >> I saw that later.  What's the default> 
namespace?> >> > >> > >> -----Original Message-----> >> From: David H> 
<hell...@gmail.com>> >> To: David G. Pickett <dgpick...@aol.com>> >> Cc:> 
gnucash-user@gnucash.org <gnucash-user@gnucash.org>> >> Sent: Wed, Apr 5,> 2023 
3:45 pm> >> Subject: Re: [GNC] Command line quotes still not fixed> >>> > >> 
And you'll see there's a whole other thread on this ->> 
>>https://lists.gnucash.org/pipermail/gnucash-user/2023-April/106181.html.>> >> 
Bug report athttps://bugs.gnucash.org/show_bug.cgi?id=798815> >> > >> If> you 
include a namespace parameter for now it will work.> >> > >> Cheers> David H.> 
>> > >> On Wed, 5 Apr 2023 at 23:00, David G. Pickett via> gnucash-user <> >> 
gnucash-user@gnucash.org> wrote:> >> > >> I can still> only update quotes with 
the interactive button, the flatpak> >> run gnucash> command that ran in 4.* is 
still broken:> >> dgp@dgp-p6803w:~$ flatpak run> --command=gnucash-cli 
org.gnucash.GnuCash> >> --quotes get> 
/home/dgp/GnuCash/ubuntu-DGPickett.gnucashMissing data file> >> parameter>> >> 
gnucash-cli [options] [datafile] - GnuCash, accounting for personal and>> >> 
small business finance:> >> Common Options:  -h [ --help ]          Show> this 
help message  -v [> >> --version ]       Show GnuCash version > --debug         
       Enable> >> debugging mode: provide deep detail in> the                   
       logs.> >> > >>                       This is> equivalent to: --log 
"=info" --log> >> > >>> "qof=info"                          --log "gnc=info"  
--extra> >> > >> > Enable extra/development/debugging features.  --log arg      
        Log>> >> > >> level overrides, of the form> >>> 
"modulename={debug,info,warn,crit,error}"> >> Examples: "--log qof=debug"> or 
"--log> >> gnc.backend.file.sx=info"                         This can be> 
invoked> >> multiple times.  --paths                Show paths  --logto> arg> 
>> File to log into; defaults to "/tmp/gnucash.trace";> >> can be> "stderr" or 
"stdout".> >> Price Quotes Retrieval Options:  -Q [ --quotes ]> arg    Execute 
price> >> quote related commands. The> following                          
commands> >> are> >>> supported.                                                
    info: Show>> >> Finance::Quote version and exposed quote> >>> sources.      
                      get: Fetch current quotes for all> >>> foreign            
                      currencies and stocks in the> >>> given> >> GnuCash       
                           datafile.> >> dump:> Fetch current quotes for 
specified currencies> >> > >>           or stocks> from a specified namespace 
and print> >>           > >>               the> results to the console.> >> > 
>> This must be followed with a source and> one or> >> > >>     more symbols, 
unless the source is "currency"> >>     >> >>         in which case it must be 
followed with two or> >>         >> >>             more symbols, the first of 
which is the> >>           >> >>           currency in which exchange rates for 
the rest> >>           >> >>               will be quoted.                      
     --namespace arg>> >>    > >>    Regular expression determining which 
namespace> >> > >>> commodities will be retrieved for when using the get> >> > 
>>   command  -V> [ --verbose ]       When using the dump command list all of> 
>> > >> the> parameters                         Finance::Quote returns for the> 
>>> symbol instead of the                          ones that Gnucash> >>> 
requires.> >> Report Generation Options:  -R [ --report ] arg    Execute> 
report related> >> commands. The following                         > commands 
are supported.> >> >> >>                                                list: 
Lists available> >>> > >> reports.                           show: Describe the 
options modified> in> >> the named                                  report. A 
datafile may> be> >> specified to                                  describe 
some saved>> >> options.> >> > >>                         run: Run the named 
report in> the given GnuCash> >>                         >> >>                  
          datafile.                           --name> arg> >>           > >>    
       Name of the report to run> >> > >>> --export-type arg      Specify 
export type> >> --output-file arg     > Output file for report> >> 
dgp@dgp-p6803w:~$ ls -l> >>> 
/home/dgp/GnuCash/ubuntu-DGPickett.gnucash-rw-rw-r-- 2 dgp dgp 2899938> >>> 
Apr> >> 4 17:55> /home/dgp/GnuCash/ubuntu-DGPickett.gnucashdgp@dgp-p6803w:~$> 
>> > >>> _______________________________________________> >> 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.> > > >> 
_______________________________________________> > 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.> >> 
_______________________________________________> 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.> > > 
_______________________________________________> 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.> _______________________________________________> 
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.

_______________________________________________
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.

Reply via email to