Getting online price quotes via command line fails

Daniel Rosenberg dnlrsnbrg at gmail.com
Wed Sep 7 08:06:17 EDT 2016


I am getting closer. After getting the error below, I opened cmd as an
administrator and ran gnucash --debug --add-price-quotes
"C:\myfile.gnucash" again, only to get the same error.
Then I copied my data file to gnucash\bin and ran gnucash --debug
--add-price-quotes myfile.gnucash and it worked! The data file was updated
with the fx prices.

So two things to consider:
1. Run the console as an administrator
2. It works if the data file is in the same directory as gnucash.exe

If I try to call the data file from it's original location
(C:\User\.....\myfile.gnucash) I still get the error below.
It seems that this is a permission issue and gnucash.exe is not allowed to
write to any other directory. Any ideas on that?


Daniel Rosenberg <dnlrsnbrg at gmail.com> schrieb am Mi., 7. Sep. 2016 um
11:51 Uhr:

> Thanks for that.
>
> I ran
> gnucash --debug --add-price-quotes "C:\myfile.gnucash"
>
> The trace file returned the following:
>
> * 11:40:56  INFO <gnc.gui> [main] System locale returned
> German_Germany.1252
> * 11:40:56  INFO <gnc.gui> [main] Effective locale set to
> German_Germany.1252.
> * 11:40:56  INFO <qof.engine> [guid_init] got 1629 bytes
> * 11:40:56  INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] 3 DBD
> drivers found
> * 11:40:56  INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] Driver:
> mysql
> * 11:40:56  INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] Driver:
> pgsql
> * 11:40:56  INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] Driver:
> sqlite3
> * 11:40:56  INFO <gnc.engine> [gnc_hook_lookup] no hook lists
> * 11:40:58 MESSG <gnc.scm> Found Finance::Quote version 1.38
> * 11:40:58  INFO <gnc.account> [xaccAccountRecomputeBalance] acct=Template
> Root starting baln=0/1
> * 11:40:58  INFO <gnc.commodity> [gnc_commodity_table_insert] insert
> 05e267f8 template into nsp=0485f130 template
> * 11:40:58  INFO <gnc.commodity> [gnc_commodity_table_insert] insert
> 05d8dee8 ADF into nsp=0485f1a0 CURRENCY
> * 11:40:58  INFO <gnc.commodity> [gnc_commodity_table_insert] insert
> 05d8de98 ADP into nsp=0485f1a0 CURRENCY
> [... one line for each currency]
> * 11:40:58  WARN <gnc.bin> Session Error: failed to load 'C' using
> access_method
>
> Does this mean that it can't access drive C:?
>
> Colin Law <clanlaw at gmail.com> schrieb am Mi., 7. Sep. 2016 um 11:06 Uhr:
>
>> On 7 September 2016 at 09:59, Daniel Rosenberg <dnlrsnbrg at gmail.com>
>> wrote:
>> > Quick update: I normally started GnuCash, got todays price quotes,
>> saved and
>> > closed it. The trace file is empty.
>>
>> Add --debug to the command line to get more detail.
>>
>> Colin
>>
>> >
>> >
>> > Daniel Rosenberg <dnlrsnbrg at gmail.com> schrieb am Mi., 7. Sep. 2016 um
>> 10:50
>> > Uhr:
>> >>
>> >> Colin Law <clanlaw at gmail.com> schrieb am Mi., 7. Sep. 2016 um 10:36
>> Uhr:
>> >>>
>> >>> On 7 September 2016 at 09:25, Daniel Rosenberg <dnlrsnbrg at gmail.com>
>> >>> wrote:
>> >>> > Hi,
>> >>> >
>> >>> > I am running GnuCash 2.6.13 on Windows. Getting price quotes for
>> >>> > currencies
>> >>> > works using the GUI.
>> >>> >
>> >>> > I am trying to get the price quotes from a command line with the
>> >>> > following
>> >>> > command:
>> >>> > gnucash --add-price-quotes C:\myfile.gnucash
>> >>>
>> >>> Have you really got your accounts file in the root of C:? That sounds
>> >>> like a bad idea.
>> >>>
>> >> No, my accounts file is in another directory, but for testing purposes
>> I
>> >> put a copy of it there.
>> >>
>> >>>
>> >>> > The Strawberry Perl window opens and closes quickly and no quotes
>> are
>> >>> > retrieved. This also happens on normal GnuCash startup.
>> >>>
>> >>> What do you mean by the final statement?  Do you mean that
>> >>> gnucash C:\myfile.gnucash
>> >>> also fails?  If so then this is not an issue with the quotes but just
>> >>> with running from the command line.
>> >>>
>> >>> This will show you where to find the trace file which will likely have
>> >>> more information.
>> >>> https://wiki.gnucash.org/wiki/Tracefile
>> >>
>> >>
>> >> I will check the trace file, thanks for the link.
>> >> Runnig 'gnucash C:\myfile.gnucash' from the command line works, it
>> opens
>> >> my GnuCash data file.
>> >> What I meant was that the Strawberry perl windows opens and closes
>> quickly
>> >> on GnuCash startup (just as it does when manually executing 'gnucash
>> >> --add-price-quotes C:\myfile.gnucash'). This was not the case before
>> >> installing the online price quote.
>> >> Hence my question if the price quotes are (or should be) automatically
>> >> updated on GnuCash startup.
>> >>
>> >>>
>> >>>
>> >>> Colin
>>
>


More information about the gnucash-user mailing list