Summary: | Investments - Edit and New investments - Unable to display online source list for Finance::Quote | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | timothy <egroegboyle> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | egroegboyle, ostroffjh, paul.noel1 |
Priority: | NOR | ||
Version: | 5.0.7 | ||
Target Milestone: | --- | ||
Platform: | Debian stable | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kmymoney/56d118b136f697af756e796688dda0b41727df02 | Version Fixed In: | 5.0.8 |
Sentry Crash Report: |
Description
timothy
2019-11-20 17:36:46 UTC
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. *** |