After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748459 - Finance quote fails to update stock prices
Finance quote fails to update stock prices
Status: RESOLVED INCOMPLETE
Product: GnuCash
Classification: Other
Component: Currency and Commodity
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: gnucash-core-maint
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2015-04-25 17:29 UTC by btjones16
Modified: 2018-06-29 23:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description btjones16 2015-04-25 17:29:13 UTC
/Applications/Gnucash.app/Contents/MacOS/Gnucash --debug --add-price-quotes [FILENAME] fails with the below error.

Application Path /Applications/Gnucash.app/Contents/MacOS/Gnucash-bin
Found Finance::Quote version 1.37
Backtrace:
In ice-9/boot-9.scm:
 157: 3 [catch #t #<catch-closure 8a3b650> ...]
In unknown file:
   ?: 2 [apply-smob/1 #<catch-closure 8a3b650>]
In ice-9/boot-9.scm:
 157: 1 [catch #t #<catch-closure 8fdfa80> ...]
In unknown file:
   ?: 0 [apply-smob/1 #<catch-closure 8fdfa80>]

ERROR: In procedure apply-smob/1:
ERROR: In procedure scm_flush: Bad file descriptor


In the Price Editor, clicking Get Quotes fails with the error "There was a system error while retrieving the price quotes."

I am using GNUCash version 2.6.6 built from rev 132c9e3+ on 2015-03-31.
Comment 1 John Ralls 2015-04-26 14:06:48 UTC
What happens if you run 
  /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-dump yahoo AAPL
Comment 2 btjones16 2015-04-26 15:35:43 UTC
bash: /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-dump yahoo AAPL
Finance::Quote fields Gnucash uses:
    symbol: AAPL                 <=== required
      date: 04/24/2015           <=== required
  currency: USD                  <=== required
      last: 130.28               <=\       
       nav:                      <=== one of these
     price: 130.28               <=/        
  timezone:                      <=== optional
Comment 3 John Ralls 2015-04-26 16:13:39 UTC
OK, good, F::Q is working correctly.

The default fix for scheme problems these days is to 
  rm -rf ~/.cache/guile

I don't expect that it will make a difference, but it rules out a possible problem.

How many securities are you getting prices for?
Comment 4 btjones16 2015-04-26 18:32:18 UTC
I am attempting to update 12 stocks. However, I can replicate the problem with a single stock using the following steps:

(1) File->New File (Accept all defaults)
(2) Save the database (either sqlite or xml results in the same error).
(3) Add a new account under Assets.
    Account type: stock
Comment 5 btjones16 2015-04-26 18:36:23 UTC
I am attempting to update 12 stocks. However, I can replicate the problem with a single stock using the following steps:

(1) File->New File (Accept all defaults)
(2) Save the database (either sqlite or xml results in the same error).
(3) Add a new account under Assets.
    Account type: Stock
    Security Type: NYSEARCA
    Security Symbol: VTI
    Select get online quotes when creating the security.
(4) Open the price editor and click "Get Quotes."

It also appears with other symbols (e.g. NYSE:F)
Comment 6 John Ralls 2015-04-26 20:26:35 UTC
What's the absolute path to your accounts file?
Comment 7 btjones16 2015-04-26 20:28:18 UTC
The original file is /Users/btjones/personal/gnucash/Expenses.gnucash. For replicating the problem, I saved the file as /Users/btjones/Desktop/expense.gnucash.
Comment 8 John Ralls 2015-04-26 21:10:40 UTC
Rats. No reason for that to be the problem. I was hoping for non-ascii characters that I could blame Guile for not handling correctly. I'm grasping at straws at this point; I can't think of a reason for that failure, and of course it works fine for me here.
Comment 9 Geert Janssens 2015-04-27 18:11:09 UTC
I have no idea either why this is happening. The error is also very shy on details unfortunately.

So I can only offer a few more suggestions to get more information or some things to try:

* Do you have another guile using application you your system ? For example lilypond comes to mind which has caused issues on Windows. Or an installation of fink/macports/homebrew that ships its own version of guile that might be interfering ? If so I would expect more parts of GnuCash to break though...

* What's the contents of the gnucash trace file when you execute Get Quotes from within gnucash ? Perhaps it has some additional details compared to the command line invocation.

* Did previous versions of gnucash work ?
Comment 10 btjones16 2015-04-28 10:38:44 UTC
- I'm not sure what application is using it, but Homebrew installed guile (GNU Guile 2.0.11) is the first one on my PATH variable. 

- I do not see any errors in the output from Get Quotes in the trace file. The full output is below.

* 06:37:04  INFO <qof.object> [qof_object_foreach] type=Split
* 06:37:04  INFO <qof.engine> [qof_collection_foreach] Hash Table size of Split before is 5614
* 06:37:04  INFO <qof.engine> [qof_collection_foreach] Hash Table size of Split after is 5614
* 06:37:04  INFO <qof.query> [qof_query_run_internal] matching objects=0x3a6bf40 count=120

- The problem also existed with GNUCash 2.4.13. I have not checked any other versions.

Thank you for the suggestions. It seems that it is likely something specific to my machine configuration, so I will do some more digging on my own and post if I find anything here.
Comment 11 Per Kjeldaas 2015-06-17 18:59:30 UTC
I just installed GnuCash on a new computer with MS Server 2012 R2, and then installed the quotes program, both using GUI point and click.  When I opened the data file that has worked before, and clicked Price Editor and Get Quotes, I get the error message "There was a system error while retrieving the price quotes".  I don't see any log.conf file.
Comment 12 John Ralls 2015-06-18 23:02:53 UTC
(In reply to btjones16 from comment #10)
> - I'm not sure what application is using it, but Homebrew installed guile
> (GNU Guile 2.0.11) is the first one on my PATH variable. 
> 
Are you using Homebrew or our dmg? If the latter, why on earth do you have Guile installed via Homebrew?
Comment 13 John Ralls 2015-08-18 20:36:41 UTC
(In reply to Per Kjeldaas from comment #11)
> I just installed GnuCash on a new computer with MS Server 2012 R2, and then
> installed the quotes program, both using GUI point and click.  When I opened
> the data file that has worked before, and clicked Price Editor and Get
> Quotes, I get the error message "There was a system error while retrieving
> the price quotes".  I don't see any log.conf file.


http://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_fix_a_.22system_error.22_or_.22unknown_error.22_when_getting_stock_quotes.3F
Comment 14 John Ralls 2015-08-18 20:37:51 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!
Comment 15 Bill Carlson 2015-11-02 00:38:22 UTC
I am having this problem as well, OS X.  gnc-fq-dump works fine.  Same error message when trying to update quotes:

There was a system error while retrieving the price quotes


How can I help debug this, it is a real pain.

Thanks
Comment 16 John Ralls 2015-11-02 00:48:05 UTC
The problem is usually that gnc-fq-helper is returning a bad string for one of your symbols. Since gnucash can't parse the bad string it can't report which symbol is bad. Your best bet is to turn off "retrieve online quotes" in each security, one at a time, until it doesn't fail.
Comment 17 Bill Carlson 2015-11-02 02:53:22 UTC
Actually, gnc-fq-dump worked but gnc-fq-helper failed due to missing Date/Manip.pm 
Once I installed via cpan it worked.  Perhaps you should add that as a dependence
in gnc-fq-update.

Thanks!
Comment 18 John Ralls 2015-11-02 03:37:09 UTC
It is, but it wasn't for 2.6.6 and 2.6.7. Likely you haven't run gnc-fq-update from 2.6.8 or 9.
Comment 19 Bill Carlson 2015-11-02 12:18:27 UTC
Thanks, you guys are doing an awesome job with gnucash!
Comment 20 John Ralls 2018-06-29 23:40:28 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=748459. Please update any external references or bookmarks.