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
Can you please open Quotes\_CGR.TO_.txt file and see for what date there is already quote in there (last line).
The last quote for CGR_TO was 2024-04-016 (yesterday)
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.
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.
\Investing\v24\Data>echo off
09:07:38 Script: Yahoo Historical . Quotes Requested/Succeed/Failed/Rows: 7/7/0/0. Duration: 30 sec.
Get-Item : Cannot find path 'D:\Investing\v24\Data\QuotesIntraDay\YahooIntraday.txt' because it does not exist.
At \Investing\v24\Data\Scripts\GetQuotes-YahooIntraday.ps1:52 char:7
+ $fc = Get-Item -Path $quoteIDFile; if ($fc.Length -eq 0) {Remove-Item ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (D:\Investing\v2...hooIntraday.txt:String) [Get-Item], ItemNotFoundE
xception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
Remove-Item : Cannot find path 'D:\Investing\v24\Data\QuotesIntraDay\YahooIntraday.txt' because it does not exist.
At \Investing\v24\Data\Scripts\GetQuotes-YahooIntraday.ps1:52 char:59
+ ... IDFile; if ($fc.Length -eq 0) {Remove-Item -Path $quoteIDFile;} # Rem ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (D:\Investing\v2...hooIntraday.txt:String) [Remove-Item], ItemNotFou
ndException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand