Read the statement by Michael Teeuw here.
MMM-AVStock not loading quotes
-
I’m using the MMM-AVStock module, and it stopped loading quotes a couple of days ago and investigated it today.
It looks like the module might be no longer compatible with yahoo finance?
Found in the mm container logs the following for every stock I have configured (using mm containerised from the magic mirror os install).
[2026-01-06 10:42:02.943] [ERROR] [MMM-AVStock] Error in loading quote data for Symbol ^NZ50Added to the try/catch that pulls the stock the following so can see the actual error:
console.error(error);The stack trace logged:
[2026-01-06 10:42:02.943] [ERROR] [MMM-AVStock] Error in loading quote data for Symbol ^NZ50 [2026-01-06 10:42:02.945] [ERROR] [MMM-AVStock] SyntaxError: Unexpected token 'T', "Too Many Requests " is not valid JSON at JSON.parse (<anonymous>) at parseJSONFromBytes (node:internal/deps/undici/undici:5852:19) at successSteps (node:internal/deps/undici/undici:5833:27) at fullyReadBody (node:internal/deps/undici/undici:4725:9) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async consumeBody (node:internal/deps/undici/undici:5842:7)I did have a play with adding a 15 sec pause for each pull of a stock in case some simple rate limiting would resolve it, but did not resolve the issue.
Have noted the module uses an older version of yahoo-finance2, so wondering if that needs upgraded - gets beyond my basic js skills.
-
@scottwalsh I think there is an issue open on the module GitHub that describes a work around
-
@sdetweil
On the MMM-AVStock GitHub page? I don’t find an issue there that seemed to match.Have found issue report for the yahoo-finance2 api, and that is resolved in the latest version by being able to set the user agent. However, looks like yf2 would need upgraded in MMM-AVStock, and then set the user agent.
-
@scottwalsh but there is a pull request
https://github.com/lavolp3/MMM-AVStock/pull/87 -
@sdetweil That was my pull request. It needed to be updated to work with yahoo-finance2 v3. I got that working on my pi5. Have a look at the fix in my repo:
https://github.com/sonnyb9/MMM-AVStock/tree/fix-yahoo-finance-v3Thanks
SB -
@ArnoldoB I am not a user on the module, I’m just trying to help users make it thru the troubles that keep on coming
-
@ArnoldoB
Is it still working? I see your pull request is before the version of yahoofinance that made the user agent changes a couple of days ago. -
@scottwalsh I’m not sure. I haven’t tried since last month. Yahoo_finance API is a moving target. I’ve been busy writing my own stock, crypto and forex module after yahoo_finance2 last annoyed me.
-
The fork you created doesn’t resolve it, also needed to use the new function to set the user agent.
Was able to build on the branch you created for v3 support and get it working.
In summary:
Forked your branch
Upgraded yahoo finance to the latest version (3.11.2).
Update MMM-AVStock to use the new user agent function (^3.11.2)Looks like all fixed.
Will give it a day or two and it looks fine will submit a pull request.
-
@scottwalsh I’m glad my little fix was helpful in finding a solution.
