Price Retrieval Failure, Part 2

Geert Janssens geert.gnucash at kobaltwit.be
Sat Feb 10 06:00:27 EST 2018


Op vrijdag 9 februari 2018 05:40:22 CET schreef David T.:
> Unfortunately, adding these lines to my config.user did not result in any
> further information.  I am stumped, and disappointed.
> 
I tried it myself on OS X now and indeed it doesn't work as it does on linux. Sorry about that.

Attached you will find an adjusted version that does work on my OS X box (which is pretty old).

It will print a warning on the console stating either the key is not set or what it is set to. To find 
this message you have to open Console and search for "ALPHAVANTAGE" after you have started 
gnucash.

Does this reveal the requested information ?

> <aside>
> It seems that an upgrade of GnuCash not only tanks one’s customized
> environment file in the application bundle (understandable), but also any
> additional files that a user might have put into the DOT_GNUCASH_DIR
> folder—like, custom scheme reports, or a config.user file that a user might
> have created in vain attempts to get said custom reports to load into their
> personal installation of GnuCash. I find this circumstance to be rather
> troubling, as the files that a user has put into this folder should not be
> summarily sent to the executioner by the next version of the application.
> This is especially troubling given that the authorized methods for creating
> and using custom scheme reports (as convoluted and sensitive as they are)
> specifically directs such reports to be placed into this folder. If *I*
> were to have written a custom report for GnuCash (as opposed to simply
> copying someone else’s work to my own system) I would be pretty ticked off
> to find my work discarded this way. Thank goodness I had backups, but
> really, one shouldn’t have to restore from a backup on this. </aside>
> 

Indeed. And on linux this doesn't happen. So if this is the case on OS X, that's a bug.

Geert
-------------- next part --------------
(use-modules (gnucash main))
(let ((api-key (getenv "ALPHAVANTAGE_API_KEY")))
  (if (not api-key)
      (gnc:warn "ALPHAVANTAGE_API_KEY is not set")
      (gnc:warn (string-append
                  "ALPHAVANTAGE_API_KEY is set to '"
                   (getenv "ALPHAVANTAGE_API_KEY") "'")
      )
  )
)


More information about the gnucash-user mailing list