I'm a high school teacher and have been teaching CS50 AP for about 7 years now. I like to make sure that I have a handle on all of the problem sets before going over them with my students. So, when I saw that the Finance pset had been updated, I went to my working Finance program from years past, and ran the updates in the red box at the top of the pset, and brought over all of my code that had been working in the past into the new app.py from my old application.py. (passed all the check50s back when I first wrote it).
Registering and logging in seem to work just fine, but whenever I do anything that needs to contact the Yahoo stock API, it breaks. Asking for any quote for a new user (DIS, NFLX, AAPL, NYT are all examples I tried) always returns the apology that it is not a real stock. When I test trying to render the portfolios of people already in my database from years past, I get a server error saying that:
DEBUG: https://query1.finance.yahoo.com:443 "GET /v7/finance/download/NYT?period1=1712593199&period2=1713197999&interval=1d&events=history&includeAdjustedClose=true HTTP/1.1" 429 19
ERROR: Exception on / [GET]
(lots of other traceback stuff omitted)
File "/workspaces/30294154/cs50ide/Programs21-22/finance/app.py", line 43, in index
price = lookup(row.get("symbol")).get("price")
AttributeError: 'NoneType' object has no attribute 'get'
Because when it tries to lookup that stock symbol (NYT), it gets back None from the API.
I'm really lost here - I haven't made any changes to the new helper.py file, and my functions are exactly the same as the ones that were working before. Attached is one of the functions, quote, that worked fine before but is now returning None to every request.