SUMMARY When creating a new investment or editing an existing investment STEPS TO REPRODUCE 1. Open investment account; Select Investments view in left hand view selector; Right click on an investment; Choose 'Edit Investment...' from the drop down box; The investment detail wizard opens; Hit next; Hit next. 2. You are now in Select online source box; Select 'Use Finance::Quote' tick box. 3. Now click in the 'Online Source' box which should give a list of sources for F::Q. OBSERVED RESULT The box fills in with solid colour and no drop down source list is produced. The 'Factor' box is greyed out. It is thus not possible to update the online Price/Date for any new or editted F::Q investments. No error messages are shown. This result is also valid for 'New Investments...' In this case one cannot get an online quote for the new investment. The manual 'Price Update' is still operational however. EXPECTED RESULT When clicking in the 'Online Source' box a list of sources for F::Q should be shown. One would then select the appropriate source and factor and the investment would then be updated when the 'Tools/Update Stock and Currency Prices...' is selected. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Debian GNU/Linux 10.2 Buster MATE (available in About System) KDE Plasma Version: n/a KDE Frameworks Version: 5.54.0 Qt Version: Qt 5.11.3 (built against 5.11.3) ADDITIONAL INFORMATION This bug would could have occurred some time back as it would only be evident in new or editted investments using F::Q. Otherwise everything was normal and share prices of existing investments were being updated as expected. Unfortunately I do not have a version of KMM when the error occurred.
I tried to duplicate the problem here, but apparently I am missing some Perl modules. Can you try what happens if you start /usr/share/kmymoney/misc/financequote.pl from the command line? Could be, that the file is installed in a different location on your distro.
I get "Error 1" (with no trailing line break.) Which seems to come from financequote.pl around line 94, implying that no hash was returned from the $q->fetch call. Now to figure out why that happens.
I'm suspecting something in F::Q because it's returning no data almost immediately, even if I turn back on the automatic fallover, which should have it check all sources if the stock is not found at the first one. I think this will take a debug trace deeper into the F::Q code.
What version of F::Q are you using? I currently have 1.47 (1.470 in some palces) but it looks like 1.49 is available. 1.47 still tried to access Yahoo which is completely dead, so whether or not it ruturns anything probably depends on which source you feed to F::Q. I was trying "usa" which is supposed to check multiple US sources, but so far I only find it checking Yahoo. I'll try to update F::Q and try again.
With an updated F::Q (and associated other perl CPAN modules) I have success, but there seem to be wrinkles. Using a source of "yahoo_json" or "fool" I do get a result. Using "usa" I get a request to get an Alphavantage API key. With the failover turned on, it always succeeds, but it seems the result hash also includes previous values, which was confusing until I realized what it was doing. However, one of the hash keys indicates which source actually did succeed, so we might consider this option. Separate issue, as mentioned in the email thread - in configuring the online source, when you check the "Use Finance::Quote" checkbox, it clears the dropdown for the online source. Thomas mentioned on the mailing list that the checked state of the checkbox is only saved if there is a value in the dropdown, so that logic doesn't make sense, separate of actually getting a quote.
My command line returns the symbol, price and date of fund requested. I am using source za and za_unittrusts for south african shares and funds. The F::Q perl modules are in /usr/local/share/perl/5.28.1/Finance/Quote/ I have updated to F::Q v1.49, but IMHO (humble) I do not think the problem is in F::Q as one has not even got the source list yet. I guess the source list must be stored in KMM because I remember asking Thomas to update KMM when F::Q finally got the za_unittrust module going and it did not autumatically appear in KMM source list.
F::Q is absolutely necessary for a South African investment portfolio as it is the only module that accesses the JSE (Johannesburg Stock Exchange) in za and za_unittrusts. But as said before, I do not think we have even got to F::Q yet since my problem is only selecting the module for later updating of share prices in 'Update Share and Currency Prices".
There is a command "/usr/share/kmymoney/misc/financequote.pl -l" which gives a listing of all F::Q sources. Maybe this is used to show the source list in KMM.
Runnung KMM from the command line: as soon as I click on 'Use Finance::Quote' the F::Q source list is generated in the terminal. When I click on "Finish" the following error code appears. qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2193, resource id: 13436031, major code: 40 (TranslateCoords), minor code: 0 I hhope that helps.
I do not think that error is related, and I'm getting a "Unknown view '' in slotOpenURL()" which I also think is not related, but I'm not certain. However, it does seem clear that "financequote.pl -l" is getting called, and the results are echoed to stdout, but not being used to populate the sources dropdown. I'm trying to trace through the code, but have not yet figured out where those results are getting lost.
Git commit 2d73384be87dc786fe1aecdd050b3759722e0033 by Thomas Baumgart. Committed on 22/11/2019 at 14:04. Pushed by tbaumgart into branch '5.0'. Fix loading of Finance::Quote supported sources FIXED-IN: 5.0.8 M +1 -1 kmymoney/converter/webpricequote.cpp https://commits.kde.org/kmymoney/2d73384be87dc786fe1aecdd050b3759722e0033
Git commit 56d118b136f697af756e796688dda0b41727df02 by Thomas Baumgart. Committed on 22/11/2019 at 14:05. Pushed by tbaumgart into branch 'master'. Fix loading of Finance::Quote supported sources FIXED-IN: 5.0.8 (cherry picked from commit 2d73384be87dc786fe1aecdd050b3759722e0033) M +1 -1 kmymoney/converter/webpricequote.cpp https://commits.kde.org/kmymoney/56d118b136f697af756e796688dda0b41727df02
*** Bug 390549 has been marked as a duplicate of this bug. ***