Howdy, Stranger!

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

Update script stoppped working randomly

Nothing changed on my end:


Get-Item : Cannot find path 'D:\Investing\v24\Data\QuotesIntraDay\YahooIntraday.txt' because it does not exist.
At D:\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], ItemNotFoundExcep
tion
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand

Remove-Item : Cannot find path 'D:\Investing\v24\Data\QuotesIntraDay\YahooIntraday.txt' because it does not exist.
At D:\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], ItemNotFoundEx
ception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand

Comments

  • magically fixed itself... what could explain this ? Issue with Yahoo finance ?
  • This updated script is raising error in case there is no YahooIntraday file. I am aware of this issue, but you can simply ignore it - as even error is raised, it does not have any impact. You can also fix the script GetQuotes-YahooIntraday.ps1 manually by updating line 52:
    if (Test-Path -Path $quoteIDFile) {
        $fc = Get-Item -Path $quoteIDFile; if ($fc.Length -eq 0) {Remove-Item -Path $quoteIDFile;} # Removing file when size is 0;
    }
    
  • fixed, thanks!
Sign In or Register to comment.