Getting online price quotes via command line fails

Greg Feneis mfeneis at gmail.com
Wed Sep 7 15:50:26 EDT 2016


Hi Folks,

If I recall correctly, in newer versions of Windows, the OS only allows
applications to write to files in certain locations.  Putting the file in
the root of the hard drive (C:\), you may have put it in a place where the
OS denies GnuCash permission to write to it.  Just an idea.





Kind regards,

Greg Feneis

 <http://www.linkedin.com/in/electromechanical>




On Wed, Sep 7, 2016 at 6:23 AM, david.carlson.417 <
david.carlson.417 at gmail.com> wrote:

>
>
> A very interestng problem.  Daniel, you did not mention which version of
> Windows that you are using, but it probably does not matter.It appears to
> me that your problem lies in your environment settings when you are running
> GnuCash.  Probably the path setting.  Alas, I do not recall the details of
> how to check your path when you are executing a command in a different
> environment than your command window.
> David C
>
> Sent via the Samsung Galaxy S® 5 ACTIVE™, an AT&T 4G LTE smartphone
>
> -------- Original message --------
> From: Daniel Rosenberg <dnlrsnbrg at gmail.com>
> Date: 9/7/16  7:49 AM  (GMT-06:00)
> To: Colin Law <clanlaw at gmail.com>
> Cc: gnucash-user at gnucash.org
> Subject: Re: Getting online price quotes via command line fails
>
> Colin Law <clanlaw at gmail.com> schrieb am Mi., 7. Sep. 2016 um 14:27 Uhr:
>
> > On 7 September 2016 at 13:06, Daniel Rosenberg <dnlrsnbrg at gmail.com>
> > wrote:
> > > 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?
> >
> > Is it the case that it will not work if the path you specify on the
> > command line starts with C: but if you go to the folder and then run
> > it just with myfile.gnucash in the command then it works (running as
> > admin if necessary for that folder) ?  In which case not a permissions
> > error but an interpretation of C:
> >
> >
> You summed it up correctlly. With the data file in the gnucash\bin folder
> and 'gnucash --debug --add-price-quotes myfile.gnucash' it works perfectly.
> The problem arises when I try to call the data file from its original
> location in C:\Users\...\myfile.gnucash.
> So what are the implications of this? What do you mean with "interpretation
> of C:"?
> Is there a way to solve this problem?
>
>
> > Colin
> >
> > >
> > >
> > > 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
> >
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> 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 at gnucash.org
> 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.
>


More information about the gnucash-user mailing list