Access denied when updating online quote

Hi, I’m facing a online quote failure problem. Error message is attached below

Fetching URL https://query1.finance.yahoo.com/v8/finance/chart/AAPL

Access denied to https://query1.finance.yahoo.com/v8/finance/chart/AAPL.

Unable to update price for AAPL (empty quote data)

I’m sure there is something incorrect with current computer, as online quote works perfect on another computer. Error persists after i switch to different source. and also persists after I completely shut down win11 firewall. I also believe it is not related to any specific version, as I tries different kmymoney 5.13 versions and the failure is still there.

I will appraciate if anyone can give me some clue, and is there any way to get more informative error message?

Exactly which versions are you using on the different machines? (from Help/About KMyMoney) you are right that it shouldn’t matter, but strange things happen.

More important, please compare the entries on the different PCs in Settings/Configure KMyMoney… on the Online Quotes page. Over time, those settings have changed, in response to Yahoo changing the details of the URL and the formatting of their responses.

FWIW, the entries that work for me for url, identifier, price and date are:

https://query1.finance.yahoo.com/v8/finance/chart/%1

%1

“regularMarketPrice”:((\d+|\d{1,3}(?:[,]\d{3})).\d+)

“regularMarketTime”:([\d]+)

Nothing in the Date Format field and Skip HTML stripping is checked

An additional thought is that the “access denied” error might imply some sort of network issue. Can you reach that URL in a browser?

thanks for replying. version is 5.1.3-eef04f1

yes i can directly access the url and get expected xml in a browser. I guess it’s some system setting causing this problem. Is there any way to get more informative error message so i can do some debug on my side.

Windows is tough to diagnose. I’d suggest the next thing to try is to launch KMM from command line, but I don’t know what that would be in Win11. If you launch from command line “/path/to/installed/kmymoney.exe” it will put more warnings and errors out to the console.

I really don’t know why the URL works fine in a browser, but not when issued by KMyMoney, especially if you have disabled the firewall.

Thanks for help. this is very useful. I have some meaningful observations. It turns out to be some specific and complicated network issue and problem with local proxy settings.

When i try update quote, i see it prints this in console:

created tmpfilekf.kio.workers.http: Can’t communicate with kded_kcookiejar!kf.kio.workers.file: readData() returned -1kmymoney_webpricequote: quotedata “”

However, occasionally I can see kmm successfully get something like below:”Downloaded “C:/Users/XXXXX/AppData/Local/Temp/kmymoney.ipCBXG” from QUrl(“https://query1.finance.yahoo.com/v8/finance/chart/ETH”)kmymoney_webpricequote: quotedata " href=‘#’>简体中文\n \n [very long message truncated]”

This reminds me of some specific network issues. As i’m in China, some websites may be blocked. Most time I’m running a vpn, and all non-domestic traffic are directed to vpn. So i suspect my vpn does not work with kmm and yahoo was blocked. However the second message basically says yahoo finance cannot provide service in my area.

This makes me realized that somehow the kmm traffic is not redirected to vpn. Based on this observation, it is obvious that yahoo is not blocked, as i can see service not available page without vpn in both browser and occasionally kmm, then it is unclear why kmm returns -1.

Eventually i came up with a solution. I made a python script. It simply runs a local server, i ask kmm to access http://127.0.0.1:5000, instead of yahoo api, keep other configs unchanged. the script access yahoo finance, and return whatever it gets to client. This works perfect.

I believe this can be a general solution if anyone has problem with online quote, as python offers much higher flexibility and arbitrary processing logic. I’ll share my script later after more test.

That Python proxy workaround is pure genius! I completely agree—using a local middleman server is often the cleanest and most reliable way to solve those annoying networking/VPN issues when an application doesn’t play nice with system proxies.