[GNC] Yahoo JSON - throwing unauthorized error

Bruce Schuck bschuck at asgard-systems.com
Sun May 7 15:12:21 EDT 2023


On 5/7/23 11:33, David G. Pickett wrote:

> I have previously posted my mystery regarding why I am stuck 1.5301 
> even after downloading and installing later versions!  I went to 
> flatpak to get later releases than the Ubuntu base.  I guess I can 
> start doing uninstall hacks using synaptics!  If it is not broke 
> ....

Still partly my bad. When I push interim releases to CPAN/PAUSE I have 
to remember to use the 1.dd_dd format instead of 1.dddd. Otherwise the 
distro gets indexed as an official release.

> Switching all my securities to Alphadvantage was tiresome, as the
> gui was no responsive to the keyboard, but I found the source could
> be found using page up.
Last time I switched en-masse (alphavantage to yahoo_json) I manually 
edited my foobar.gnucash file. Worked like a charm.

** Create a backup ** of foobar.gnucash before following these steps. 
Replace 'vim' with your preferred editor.

~$ cp <pathtofile>/foobar.gnucash /tmp/foobar.gnucash.gz
~$ cd /tmp
/tmp $ gunzip foobar.gnucash
/tmp $ vim foobar.gnucash

In vim, change lines

<cmdty:quote_source>alphavantage</cmdty:quote_source>

to

<cmdty:quote_source>yahoo_json</cmdty:quote_source>

Save and exit

/tmp $ gzip foobar.gnucash
/tmp $ cp foobar.gnucash.gz <pathtofile>/foobar.gnucash

Run GnuCash, confirm quote sources for a random few securities.

There is also a handy tool for editing XML files on the fly, xmlstarlet. 
It can also be used to modify the uncompressed .gnucash file.

- Bruce S.


More information about the gnucash-user mailing list