Running /Applications/Gnucash.app/Contents/MacOS/Gnucash --add-price-quotes twice fails on the second (and subsequent) run because the database file is locked. I run this via an automator script each day to update prices. I don't know if the lock is also held on other OS's (eg Windows or linux)
Are you sure GnuCash isn't crashing? Check the User Reports tab in /Applications/Utilities/Console for reports beginning with GnuCash.
(In reply to John Ralls from comment #1) > Are you sure GnuCash isn't crashing? Check the User Reports tab in > /Applications/Utilities/Console for reports beginning with GnuCash. Nothing related to GnuCash in the Console User Reports tab. AFAIK all prices are updated by the --add-price-quotes provided the database is not locked. The app appears to end normally when run in a terminal session but terminates immediately if run a second time. Opening it interactively reveals that the database is locked.
Hmm, when I try it I get a bunch of errors in the tracefile... I also don't get any prices. Can you run it by hand (after clearing the lock) and attach the resulting tracefile? https://wiki.gnucash.org/wiki/Tracefile.
I found several issues and fixed them so that I can now retrieve prices into a SQLite3 db from the command line. The fix will be in 3.3.
Created attachment 372919 [details] tracefile from case where gnucash retrieves the prices and leaves the db locked Thanks for your quick response, John. I definitely get the prices, but can only do it once as it leaves the db locked. Here's the tracefile in case you want to take a look. I ran it with --debug --extra. If you want to make a binary available for me to test then please let me know.
Comment on attachment 372919 [details] tracefile from case where gnucash retrieves the prices and leaves the db locked Didn't need --debug, the errors I'm looking for are all of the CRIT at the end of the trace. Yes, that's one of the problems I fixed, so all should be well.