I am running GnuCash Version 3.3, Build 3.3+ (2018-09-29), Finance::Quote 1.47 on Windows 7 64-bit SP1. All Windows updates are current. Running gnucash --add-price-quotes does not update any prices. Running "Get Quotes" from within GnuCash works fine. I have verified that all the gnc-fq-* scripts execute normally, retrieving prices. All commodities are defined to use Alphavantage (US) as the price source. I have defined the Windows environment variable ALPHAVANTAGE_API_KEY correctly. If I redirect STDOUT and STDERR from gnucash --add-price-quotes, I get the following: STDOUT: Found Finance::Quote version 1.47 STDERR: 3:2018/12/27 17-18-04:gwen(6944):C:/gcdev64/gnucash/releases/src/gwenhywfar-4.20.0/src/base/i18n.c: 120: No translation found for WIN32 locale [English_United States.1252] I am guessing that the error logged to STDERR is causing GnuCash to terminate immediately when running with the --add-price-quotes option. I do not have any other instances of GnuCash running at the time. Any help is much appreciated. I would love to get automatic price quotes working.
No reason to believe that. Please attach a tracefile (https://wiki.gnucash.org/wiki/Trace_file) from a failed attempt to use --add-price-quotes.
Created attachment 373083 [details] Trace file as requested Unedited trace file from running gnucash with --add-price-quotes. When running gnucash normally (i.e. in GUI), a trace file is created but is empty.
Hmm, not terribly enlightening, though it does rule out a crash. Try again with gnucash --debug --add-price-quotes Which will add some progress reporting.
I have now run gnucash --debug --extra --add-price-quotes, once against an XML .gnucash file, and once against a sqlite .gnucash file. The logs are almost identical, the small difference no doubt related to the different back-end data methods. Please see 2 new attachments.
Created attachment 373084 [details] --debug --extra --add-price-quotes XML data
Created attachment 373085 [details] --debug --extra --add-price-quotes SQLite data
Comment on attachment 373085 [details] --debug --extra --add-price-quotes SQLite data Are you passing the account file name as C:\path\to\file? If so try giving it "file:///C:/path/to/file" instead.
Great! The file URI solved the problem. Thanks for the suggestion. FYI, the URI needs to be: "file://C:/path/to/file". Inserting the extra "/" after the "file://" protocol results in a file not found error for file "/C:/path/to/file".
Great. I've added a note to https://wiki.gnucash.org/wiki/Online_Quotes#Updating_enabled_Quotes_from_outside_GnuCash to help others.
Actually I believe this is a bug. GnuCash is supposed to be able to interpret local filesystem paths correctly. I have an idea where this goes wrong, though a proper fix will have to wait until I have access again to a windows development box/vm. For now the workaround John suggested should unblock you. Out of curiosity and extra test results, can you also try with this format: /C/path/to/file So without "file://" and without the colon after the C
Here are some additional test results for you. FYI, gnucash, PERL, and the gnucash data file are all on the same drive (C:). FAILURE: ======= gnucash.exe --add-price-quotes C:\path\to\file gnucash.exe --add-price-quotes C:/path/to/file gnucash.exe --add-price-quotes \C\path\to\file gnucash.exe --add-price-quotes /C/path/to/file SUCCESS: ======= gnucash.exe --add-price-quotes file://C:\path\to\file gnucash.exe --add-price-quotes file://C:/path/to/file gnucash.exe --add-price-quotes \path\to\file gnucash.exe --add-price-quotes /path/to/file Let me know if you need any more tests.
Is the essence of this issue, "gnucash --add-price-quotes always fails", as the title currently reads, or is it now focussed to, "gnucash.exe --add-price-quotes fails when Windows file path includes drive letter"? Reading this discussion, I think it is the latter. If so, then perhaps the issue title should be clarified. I am having a problem with gnucash --add-price-quotes always fails on macOS. However, it does not involve drive letters. I suspect it is a separate problem. I will post my problem to the gnucash-user list for support first, and file a bug report if the list agrees it is actually a bug. However, I still think it may be helpful to clarify the title of this issue.
Jim, OK.