Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Yahoo Historical Not Working (or I broke something)

Hello,

This morning I downloaded the new Yahoo intraday exchange rate and quotes ps1 files and replaced the existing ones. I ran the update but now the Yahoo historical is failing.



And from the log: (all holdings have the same message)

Symbol: CGR.TO. Next date: 2024-04-17. Quote file: C:\Users\danmo\OneDrive\Documents\Investment Information\PortfolioSlicer\Quotes\_CGR.TO_.txt
Requesting url: https://query1.finance.yahoo.com/v7/finance/download/CGR.TO?period1=1713312000&period2=1713345101&interval=1d&events=history&crumb=
CGR.TO - Not Found (web err)

Comments

  • The error is in psMakeAllDataFiles.ps1 file line 85 and it is related to adding exchange intraday rates. Can you please go to CurrExchIntreaDay folder and remove all files from there and re-run script.
    Can you please open Quotes\_CGR.TO_.txt file and see for what date there is already quote in there (last line).
  • I deleted YahooCurrExchIntraday.txt (which contained nothing) from the folder as directed. I reran the script and got same error.

    The last quote for CGR_TO was 2024-04-016 (yesterday)
  • As you already have 2024-04-16 data for CGR.TO in the file, Yahoo historical load will not find any quotes, so your message "Not Found (Web err)" is normal. Eventually, during one run it will find new quote and will put it with date 2024-04-17 into the file and then again will return "not found" until some time tomorrow night.

    But you still need to address the issue with psMakeAllDataFiles.ps1 script line 85.
    Can you please post here how many files you have in CurrExchIntraDay folder and the content of each file.
  • When I looked the first time, and when I look now, there is only 1 file in CurrExchIntraDay folder, it is today's date, it is 0kb, and there is no text in the file.
  • Hi @dmorley64 ,

    Thank you for reporting this.

    There was a bug in GetExchRates-YahooIntraday.ps1 - when the intra-day currency exchange file is empty, you will get error in psMakeAllDataFiles.ps1 file line 85. This update to the same GetExchRates-YahooIntraday.ps1 and GetQuotes-YahooIntraday.ps1 scripts will delete files with size 0.

    Updated scripts can be downloaded here or from updated download page.
  • Awesome, thanks, tested the new scripts and all is working again!
  • any updated script for us poor souls still using 2.x ???
  • Same updated 2 scripts will work with version 2.x
  • Work like a charm, thanks Vidas!
Sign In or Register to comment.