feram18 / led-stock-ticker

A display for real-time prices of stocks, cryptocurrencies, and forex rates on a Raspberry Pi-driven RGB LED matrix board. 📈
GNU General Public License v3.0
72 stars 11 forks source link

LED Matrix Stopped Updating #30

Closed mattrcarroll closed 10 months ago

mattrcarroll commented 1 year ago

Hi,

My Led Stock Ticker stopped updating prices on 10/31/23 and I have not been able to resolve. It has been working fine for many months prior. Any suggestions on how to resolve? I have attached the log below. This is an awesome project and I really appreciate you sharing it! -Matt

led-stock-ticker.log

Configuration

feram18 commented 1 year ago

There seems to be an issue with the yahoo finance API. I'll investigate a solution.

mattrcarroll commented 12 months ago

I updated to the latest version of yahooquery (2.3.3) but that did not fix it.

feram18 commented 12 months ago

Only updating yahooquery to 2.3.3 did not work for me either, but I found that my network was blocking a domain that the API queries (fc.yahoo.com). Others experienced this issue as well.

After updating the dependency and whitelisting this domain I was able to get it working again.

mattrcarroll commented 11 months ago

Configuration:

Raspberry Pi Model: 3B+ Operative System: Raspberry Pi OS (2023-05-03-raspios-bullseye-arm64-lite.img) LED Matrix Size: 64×32 Display Adapter: Adafruit RGB Matrix HAT Python Version: 3.9.2 YahooQuery: 2.3.3

I continue to have difficulty getting my LED Stock Ticker to work since the changes to the yahoo api were made. Prior to this it worked perfectly.

As suggested, I have updated to yahooquery 2.3.3 and confirmed there is no adblocking or dns filtering blocking fc.yahoo.com. Still, receiving 404 errors.

To help rule out any issues with my existing configuration, I installed a new clean image of Raspberry Pi OS (2023-05-03-raspios-bullseye-arm64-lite.img) on the microsd card and ran the below exact sequence of commands to install LED Stock Ticker, upgrade to Yahooquery 2.3.3, and then run main.py.

The log file showing the errors generated when main.py is run after running the below sequence of commands is attached.
led-stock-ticker.log


Steps I completed: Started with clean install of Raspberry Pi OS (2023-05-03-raspios-bullseye-arm64-lite.img). Then did the following:

sudo apt-get update sudo apt-get upgrade sudo apt-get install git python3-pip -y

git clone --recursive https://github.com/feram18/led-stock-ticker.git cd led-stock-ticker chmod +x install.sh ./install.sh

cd led-stock-ticker ./update.sh

cd pip3 install yahooquery –upgrade

cd led-stock-ticker sudo python3 main.py --led-gpio-mapping="adafruit-hat" --led-slowdown-gpio=2 --debug


Any suggestions or thoughts on what I am doing wrong or what the issue could be?

Also, if I separately run the following code on my raspberri pi it returns the msft data without issue. So, I have to have to think the issue is now something other than yahooquery.

  from yahooquery import Ticker

  tickers = Ticker('msft', asynchronous=True)

  df = tickers.history(period='1mo', interval='1m')

                                   close  dividends  ...        open    volume

symbol date ... msft 2023-10-24 09:30:00-04:00 331.040009 0.0 ... 331.299988 891713.0 2023-10-24 09:31:00-04:00 331.040009 0.0 ... 331.089996 105533.0 2023-10-24 09:32:00-04:00 330.325012 0.0 ... 331.170013 95112.0 2023-10-24 09:33:00-04:00 330.320801 0.0 ... 330.350006 96754.0 2023-10-24 09:34:00-04:00 331.325012 0.0 ... 330.380005 111415.0 ... ... ... ... ... ... 2023-11-20 15:55:00-05:00 377.369995 0.0 ... 377.399994 242532.0 2023-11-20 15:56:00-05:00 377.345001 0.0 ... 377.369507 164481.0 2023-11-20 15:57:00-05:00 377.369995 0.0 ... 377.350006 223004.0 2023-11-20 15:58:00-05:00 377.260010 0.0 ... 377.244995 332892.0 2023-11-20 15:59:00-05:00 377.609985 0.0 ... 377.250000 693786.0

[7777 rows x 6 columns]

mattrcarroll commented 11 months ago

Only updating yahooquery to 2.3.3 did not work for me either, but I found that my network was blocking a domain that the API queries (fc.yahoo.com). Others experienced this issue as well.

After updating the dependency and whitelisting this domain I was able to get it working again.

Hi Luis. Did you simply do pip3 install yahooquery==2.3.3 to get yours working again? I still show 404 errors in the log after making this update. I use 1.1.1.1 for dns and don't use a network ad blocker. Thank you for your help!

feram18 commented 11 months ago

Sorry for the delayed resolution.

Originally, only upgrading the yahooquery dependency worked on my dev setup, but later found out it did not fix the issue when running on my Raspberry Pi. Upgraded a few other dependencies and now everything seems to be working on both my dev setup & two Raspberry Pi's. Using strict dependency versions (now present in v0.3.16) should help with inter-dependency issues. Let me know if this works for you.

LiminalD commented 11 months ago

Hi Feram, I installed the update but after the start-up screen it permanently switches to the clock...

See attached the log file. led-stock-ticker.log

Raspberry Pi Model: 4B Operative System: Raspberry Pi OS LED Matrix Size: 64×32 Display Adapter: Adafruit RGB Matrix HAT Python Version: 3.9.2

Great project btw and keep up the good work!

Ulfb3rth commented 11 months ago

Hello everyone, I have the same problem, only the clock is displayed

led-stock-ticker.log

mattrcarroll commented 11 months ago

The following solved the stuck on clock issue for me. I am not an expert so may want to wait for @feram18 to weigh in on before running.

sudo apt install libopenjp2-7 libopenjp2-7-dev libopenjp2-tools sudo apt-get install libopenblas-dev

LiminalD commented 11 months ago

It seems that Yahoo is geo blocking and users outside the US are not able to retrieve data anymore... see also: https://github.com/dpguthrie/yahooquery/issues/241 Maybe a new feature request to choose between multiple data sources?

feram18 commented 11 months ago

The following solved the stuck on clock issue for me. I am not an expert so may want to wait for @feram18 to weigh in on before running.

sudo apt install libopenjp2-7 libopenjp2-7-dev libopenjp2-tools sudo apt-get install libopenblas-dev

Perhaps the upgraded dependencies require these transient dependencies that your system did not yet have.

feram18 commented 10 months ago

It seems that Yahoo is geo blocking and users outside the US are not able to retrieve data anymore... see also: dpguthrie/yahooquery#241 Maybe a new feature request to choose between multiple data sources?

Release 0.3.17 upgrades yahooquery to resolve this issue.

LiminalD commented 10 months ago

Working again, great job!