Howdy, Stranger!

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

Yahoo quotes returning "Not Found (web err)" for all securities

135

Comments

  • I think you're absolutely right, this is what i did!

    I just ran the manipulation, but unfortunately, I'm still encountering errors. Could running my v3 batch against the v2 environment have corrupted my CSV files?"
  • You will need to also extract file psCheckFiles from your old v2 zip and replace with it.
  • The new scripts seem to be working for me with one exception. When Yahoo does not have a value for a particular day for a security, the new scripts record that valuation with a "null" value on that day. This causes a problem as I believe that PS considers that value to be $0.00.

    In the Yahoo historical prices for XEF-U.TO there is no value for 2024-09-12. In the quotes file it is recorded as "2024-09-12,,XEF-U.TO". As a consequence of this, PS reports show the security on that date as having a total value of $0, whereas I believe the value should be $27.61 - the value on the last available date (2024-09-11).

    This was not the case for the prior scripts, where on such dates the scripts did not record a value - note the values on 2024-08-30 - Yahoo shows no value, and the PS Quotes file does not have an entry for that day - and the PS reports show the security valuation as $28.78 as of 2024-08-29.

    Please see the screen captures for this security from Yahoo Finance and from the PS generated Quotes file.

    From Yahoo:



    From _XEF-U.TO_.txt:



    I hope I have explained this reasonably clearly :)
  • I had errors similar to @patr0kxxx -- and realized when I copied over the new scripts - it overwrote my psConfig.txt file. Copied my backup over - and all those errors went away!

    However I am still getting some errors - unclear the impact:
    ConvertTo-Csv : A parameter cannot be found that matches parameter name 'NoHeader'.
    At C:\Users\ssorg\Sync\Investments\PortfolioSlicer3.1\PSDataExtract\Scripts\GetExchRates-YahooIntraday.ps1:90 char:39
    + $data | ConvertTo-Csv -NoHeader -UseQuotes AsNeeded | ...
    + ~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [ConvertTo-Csv], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.ConvertToCsvCommand

    ConvertTo-Csv : A parameter cannot be found that matches parameter name 'NoHeader'.
    At C:\Users\ssorg\Sync\Investments\PortfolioSlicer3.1\PSDataExtract\Scripts\GetExchRates-YahooIntraday.ps1:90 char:39
    + $data | ConvertTo-Csv -NoHeader -UseQuotes AsNeeded | ...
    + ~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [ConvertTo-Csv], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.ConvertToCsvCommand
  • @lgross -- open a PowerShell and report back the version number when you type "$PSVersionTable".

    Mine looks like this:
    PS C:\PortfolioSlicer\Scripts> $PSVersionTable
    
    Name                           Value
    ----                           -----
    PSVersion                      5.1.19041.4780
    PSEdition                      Desktop
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
    BuildVersion                   10.0.19041.4780
    CLRVersion                     4.0.30319.42000
    WSManStackVersion              3.0
    PSRemotingProtocolVersion      2.3
    SerializationVersion           1.1.0.1
    Then do a Windows system update to see if you get a new version.
  • Using the power BI version I noticed that it now updates on the weekend dates. It didn't used to do this, it always skipped the weekends in the "daily" charts. Can this be fixed back to the old way? It shows the value change to be 0 for the weekends.
    Also, it now it updating on the day of the scan. I like it this way. Before it was always a day behind.
  • edited September 15
    @VidasMatelis thanks a lot for helping, i replaced the PsCheckFiles.txt with a (much older) copy i had and i was getting tons of errors:



    So i replaced it with the copy that gave me errors in my previous post so i am back at square 1. Absolutely no idea how to debug this!
  • edited September 15
    Thank you to @newuser for updating the GetExchRates-YahooIntraday.ps1 script.

    I tested it at 10:30 GMT Sunday 15th Sept, and the new code has resolved the previous error but seems to be encountering an issue with converting the JSON to Csv.

    ConvertTo-Csv : A parameter cannot be found that matches parameter name 'NoHeader'. "Noheader" error:



    Edited - Added the JSON error when accessing "https://query2.finance.yahoo.com/v8/finance/chart/@@CURRFROM@@@@CURRTO@@=X?period1=@FromDay@&period2=@ToDay@&interval=1d&events=history"


  • @newuser - I did not mention it in my last post -- but thank you for your work on this!

    I see now that @MikeP is seeing the same error as I am.

    The info you asked for:
    PS C:\Investments\PortfolioSlicer3.1\PSDataExtract\Scripts> $PSVersionTable

    Name Value
    ---- -----
    PSVersion 5.1.22621.4111
    PSEdition Desktop
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
    BuildVersion 10.0.22621.4111
    CLRVersion 4.0.30319.42000
    WSManStackVersion 3.0
    PSRemotingProtocolVersion 2.3
    SerializationVersion 1.1.0.1
  • I will update the script to not use the -NoHeader option from the ConvertTo-Csv function.
  • If you are using these new scripts, please backup your entire PortfolioSlicer folder. Manually check the output in the Quotes subfolder and delete any lines that are wrong.
    Wait for the next version of the scripts before trying again.
    Thank you for your patience.
  • @patr0kxxx . You need to adjust your .bat file startup folder. On bat file right mouse click, then find and change start in folder parameter.
    I am on vacation for next 12 days, so very few responses from me..
  • If anyone wants to help test some updated test scripts that Vidas hasn't published yet, please make a backup of your data and try the attached.
  • All my issues are now fixed, it was simply a mixup of v2 and v3 update scripts...

    I cant live with my PS daily update !!!

    Thanks to everyone involved!
  • @newuser I did a limited test of your draft scripts as follows:
    • only tested the "GetQuotes-Yahoo.ps1" script. I do not use IntraDay quotes in my workflow so did not test those scripts;
    • As these were the quotes that caused my issue, before running the script, I deleted only the _XEF.TO_.txt and _XEF-U.TO_.txt quotes files (and their associated _Archive files), so these would be re-created by the scripts - other quote files were left intact.
    Result:
    • appears to work correctly. _XEF.TO_.txt and _XEF-U.TO.txt files (and associated _Archive files) were re-created correctly, and excluded those dates where Yahoo did not publish closing prices;
    • Log files did not report any error conditions;
    • PS spreadsheet updated without error.
    Hope this helps.
Sign In or Register to comment.